home *** CD-ROM | disk | FTP | other *** search
/ Mars Digital Image Map / Mars Digital Image Map - Disc 1.iso / software / pc / imdisp.txt < prev    next >
Text File  |  1991-09-17  |  108KB  |  2,436 lines

  1.  
  2.                   USER'S GUIDE FOR THE PDS IMDISP PROGRAM
  3.  
  4.  
  5.                                  Chapter 1
  6.  
  7.                                 INTRODUCTION
  8.  
  9.  
  10.      This document describes version 7.5 of the IMDISP program, an
  11. interactive image processing utility for the IBM Personal Computer family
  12. (PC, XT and AT) and compatibles.  It has been developed for use with the
  13. Compact Disk - Read-Only Memory (CD-ROM) storage systems currently being
  14. evaluated by the Planetary Data System (PDS). It can also be used to
  15. display and process images stored on floppy or hard disks.
  16.  
  17.      This User's Guide presents an overview of image processing and CD-ROM
  18. fundamentals, a section on the installation of IMDISP and CD-ROM software
  19. and hardware, a description of IMDISP program operation, a description of
  20. other utility programs which can be used in conjunction with IMDISP, and a
  21. command summary.
  22.  
  23.      Other support software for using the PDS CD-ROM disks has also been
  24. developed.  These packages include the USGS Planetary Image Cartography
  25. System (PICS) for MicroVAX computers, a set of FORTRAN routines to access
  26. CD-ROM disks on VAX computers (VMSCD), and "C" language source code to
  27. process disks written in the High Sierra format.  Contact Mike Martin
  28. (JPLPDS::MMARTIN on SPAN) for access to these tools.
  29.  
  30.  
  31.                                  Chapter 2
  32.  
  33.                                  BACKGROUND
  34.  
  35.  
  36.      Efforts to utilize small computer systems for display and analysis of
  37. scientific data have been hampered by the lack of sufficient data storage
  38. capacity to accommodate large image arrays.  Most planetary images require
  39. nearly a megabyte of storage.  Over the past two years a new storage
  40. technology, "CD-ROM", has been developed which provides the capability to
  41. store up to 600 megabytes of data on a single 4.72-inch disk.  The disks
  42. can be mass produced, and hundreds of copies of large digital archives
  43. distributed rather than the few sets currently produced.  Readers for
  44. CD-ROM disks can now be purchased for under a thousand dollars for use on
  45. personal computers and some science workstations.
  46.  
  47.    The PDS has worked with industry and other government agencies to
  48. support the development of CD-ROM as a major data distribution and storage
  49. media for space science data.  Initial development efforts by the PDS, the
  50. Voyager Project, and multi-disciplinary science representatives have
  51. resulted in the production of 12 CD-ROM disks containing about 30,000
  52. images from the Voyager 1 and 2 encounters.  The IMDISP program can be used
  53. to display most of these data files on a personal computer equipped with a
  54. CD-ROM drive.
  55.  
  56.    Any feedback on the use of IMDISP is greatly appreciated, and any of the
  57. following people can be contacted for reporting bugs, adding enhancements,
  58. etc:
  59.  
  60.       Mike Martin
  61.       Jet Propulsion Lab
  62.       Internet: mmartin@jpl-pds.jpl.nasa.gov
  63.       SPAN: JPLPDS::MMARTIN
  64.  
  65.       Ron Baalke
  66.       Jet Propulsion Lab
  67.       Internet: baalke@kelvin.jpl.nasa.gov
  68.  
  69.       Archie Warnock
  70.       Goddard Space Flight Center
  71.       SPAN:     STARS::WARNOCK
  72.       Internet: warnock@stars.gsfc.nasa.gov
  73.  
  74.  
  75. 2.1 DIGITAL IMAGE PROCESSING SUMMARY
  76.  
  77.  
  78.    A digital image is a picture converted to numerical form so that it can
  79. be stored and used in a computer.  The image is divided into a matrix of
  80. small regions called picture elements, or pixels.  The rows and columns of
  81. pixels are called "lines" and "samples", respectively. Each pixel has a
  82. numerical value, or DN (data number) value, quantifying the darkness or
  83. brightness of the image at that spot.  In total, each pixel has an address
  84. (line number, sample number) and a DN value, which is all that the computer
  85. needs for processing.  The DN value of each pixel usually represents a
  86. shade of darkness or brightness between black and white (gray levels).  How
  87. many gray levels there are in an image depends on the number of bits used
  88. to represent each pixel intensity in the computer.  The number of gray
  89. levels will be equal to 2^n, where n is the number of bits per pixel's DN
  90. value.  If 8 bits are used to represent a pixel's DN value (gray level),
  91. the system will be capable of using 2^8, or 256, gray levels in an image,
  92. where DN 0 is pure black, and DN 255 is pure white.  If each DN used only 4
  93. bits of storage, the image would contain only 2^4 or 16 gray levels; if
  94. there were only 1 bit per DN, the image would contain only black and white
  95. pixels (bit values of 0 or 1).
  96.  
  97.  
  98. 2.2 OVERVIEW OF IMDISP CAPABILITIES
  99.  
  100.  
  101.    While the specifics of IMDISP commands are discussed in Chapter 4, this
  102. section provides a general overview of how a user can manipulate images
  103. once a file is selected.  There are DISPLAY commands which allow the user
  104. to display all or part of an image at various positions on the display
  105. screen.  The user may also zoom in and out from a point on the image
  106. defined by the cursor, and may pan around the image.  The cursor may be
  107. turned on or off; when on, the arrow keys are used to move the cursor
  108. around the screen; when off, the cursor is not visible.
  109.  
  110.    A user may choose to "subsample" the image, to enable more or all of the
  111. original image to be displayed on the screen at once.  For example, if the
  112. image were subsampled by a factor of 2, every other pixel from every other
  113. line would be displayed, starting from the upper left corner of the image.
  114. If a factor of 3 were chosen, every third pixel from every third line would
  115. be displayed.  Any positive integer may be used for subsampling.
  116.  
  117.    The user may produce a histogram of an image file, which is a graph
  118. showing the number of pixels per DN value, or per range of DN values, for
  119. the entire image.  Histograms are overlaid on top of the image, but may be
  120. removed using the REFRESH command.  Subsampling may be specified when
  121. computing a histogram to reduce the time required for the calculations.
  122.  
  123.    A profile may be created which plots DN value versus pixel along a line
  124. between two points on the image.  After the cursor is used to select the
  125. two endpoints, the connecting line is drawn on the image and the profile is
  126. plotted at the bottom of the screen.  There is a plot command to plot the
  127. actual data values in an image line.
  128.  
  129.    The user may also "stretch" the image, which is analogous to turning the
  130. contrast knob on a TV set.  The user specifies low and high DN values; all
  131. pixels with values lower than the specified "low" become black, and all
  132. pixels higher than the specified "high" value become white.  All pixels
  133. between the low and high values are evenly shaded between black and white.
  134. IMDISP also has several filter functions available.  The user may process
  135. the image with a convolution filter, mean or median filters.  There is also
  136. an edge detection filter, as well as functions to brighten, darken and
  137. smear the displayed image.
  138.  
  139.    There are bookkeeping types of commands, also.  These allow the user to
  140. do such things as retrieve a desired image from the CD-ROM, to save an
  141. image to a file on hard disk, and to erase only the graphics from the
  142. screen or to erase the entire screen.  Users may execute batch command
  143. files to do a series of tasks automatically.  Lastly, the user may, of
  144. course, EXIT the IMDISP program when done.
  145.  
  146.  
  147. 2.3 GRAY LEVEL AND FALSE COLOR IMAGES
  148.  
  149.  
  150.    Most planetary images are composed of 8-bit DN values representing
  151. monochrome brightness levels in the scene.  To obtain color images,
  152. separate images are taken through color filters (red, green, blue) and are
  153. then combined by ground processing systems to produce a true color image.
  154. Only a very small fraction of planetary images are available in color
  155. versions.  Most display and analysis is done on monochrome images.
  156.  
  157.    A display with 256 (2^8) gray levels is required to present the
  158. information contained in a standard image.  However, the human eye can only
  159. distinguish about 32 gray levels.  Thus 5-bit DN values would satisfy most
  160. display requirements.  Unfortunately, computers are oriented to the storage
  161. of and manipulation of items which are a power of two, and 5-bit pixels
  162. would be very clumsy.  The standard display devices which the IMDISP
  163. program supports are limited to 16 gray levels (PGA and VGA), 4 gray levels
  164. (EGA) or 2 gray levels (CGA), but the program also supports several
  165. "enhanced" VGA display devices offering up to 256 colors (or 64 shades of
  166. gray).  The 16 gray levels of the PGA are adequate to support image
  167. analysis; however 4 or 2 gray levels are practically useless for viewing
  168. planetary images.  Fortunately the EGA display will support 16 different
  169. colors, and a color palette can be selected which uses a graduated scale of
  170. colors to represent gray levels, producing a "false color" image (false
  171. because the displayed color does not represent the actual color of the
  172. scene).
  173.  
  174.    A false color image (also called a pseudo color image) is created from a
  175. black and white image by assigning a color (rather than a gray level) to
  176. each DN value in the image.  For instance, a DN value of 128 could be
  177. reassigned to yellow if the user so desired.  Ranges of DNs (e.g., 100-125)
  178. may also be assigned one color.  Pseudo colors get assigned to DN values in
  179. a pseudo color table, which the display program then uses to determine how
  180. to color the image on the monitor.  Display programs often have preset
  181. pseudo color tables with commonly used DN-color combinations, and the user
  182. can simply call for one of these when generating a pseudo color image.  The
  183. option exists, of course, for users to generate their own pseudo color
  184. tables.  Pseudo colors are often used to highlight features of an unusual
  185. nature in an image.
  186.  
  187.    Since the Enhanced Graphic Adapter for the IBM PC provides only 4 gray
  188. shades (black, dark gray, light gray and white) most image viewing is done
  189. using a pseudo color table which interprets gray levels as color values
  190. ranging from black through reds, greens and blues up to white.
  191.  
  192.  
  193. 2.4 RADIOMETRIC AND GEOMETRIC CORRECTIONS
  194.  
  195.  
  196.    All camera systems have some kind of distortions in the lens, in the way
  197. the shutter works, etc.  Distortions in the amount of fight transferred
  198. through the camera to the imaging plate are called radiometric distortions.
  199. Geometric distortion affects the "squareness" of an image, and is detected
  200. by taking an image of a geometric grid.
  201.  
  202.    For spacecraft cameras, both types of distortion can be measured before
  203. launch, and in a limited fashion, in flight.  These measured distortions
  204. are saved in digital files.  When a raw image is received, these
  205. "calibration files," as they are called, are subtracted from (or otherwise
  206. applied to) the image, effectively removing radiometric and geometric
  207. distortion.  This process is called radiometric and geometric correction.
  208. Corrected images contain the closest possible representation of the scene
  209. being imaged.
  210.  
  211.  
  212. 2.5 IMAGE FILE FORMATS
  213.  
  214.  
  215.    Digital image files are seldom stored as a simple array of pixels.
  216. Generally there is an area at the beginning of an image file containing
  217. descriptive information about the image.  This is referred to as a label or
  218. header area.  Figure 2-1 shows a diagram of a simple image format with a
  219. label area followed by the image lines.  In practice, images from planetary
  220. missions have a more complicated format, due to the need to store
  221. additional information to allow proper interpretation of the image data.
  222. Figure 2-2 shows the format of a Voyager image, which has engineering
  223. parameters embedded at the end of each image line to form a line suffix
  224. area, an engineering trailer record after the last image line, and this is
  225. followed by an image histogram.
  226.  
  227.  
  228.                        ┌────────────────────────┐
  229.                        │ Labels or Header Area  │
  230.                        ├────────────────────────┤
  231.                        │ Image Array Line 1     │
  232.                        ├────────────────────────┤
  233.                        │ Image Array Line 2     │
  234.                        └────────────────────────┘
  235.                                    .
  236.                                    .
  237.                                    .
  238.                        ┌────────────────────────┐
  239.                        │ Image Array Line n     │
  240.                        └────────────────────────┘
  241.  
  242.                     Figure 2-1: Simple Image Format
  243.  
  244.    Different image label formats have been developed for use by nearly all
  245. image processing facilities.  Two formats are widely used within the
  246. planetary and astronomy communities: the VICAR2 (Video Image Communication
  247. and Retrieval) labels used by the Multi-Mission Image Processing Laboratory
  248. (MIPL) and FITS (Flexible Image Transport) labels used for astronomy image
  249. interchange.  The PDS has developed a label scheme which is very similar to
  250. these standards, called the Object Description Language (ODL).  This format
  251. attempts to add a broader range of data descriptive capabilities to the
  252. proven capabilities of the existing label systems.  A description of the
  253. ODL architecture is given in Appendix D.
  254.  
  255.    Most of the images stored on the PDS CD-ROM disks have either ODL or
  256. VICAR2 labels.  IMDISP will automatically interpret these labels to
  257. determine the display format of the image data.
  258.  
  259.                  ┌────────────────────────────────────┐
  260.                  │ PDS ODL Labels                     │
  261.                  ├─────────────────────┬──────────────┤
  262.                  │ Image Array Line 1  │ Line Suffix  │
  263.                  ├─────────────────────┼──────────────┤
  264.                  │ Image Array Line 2  │ Line Suffix  │
  265.                  └─────────────────────┴──────────────┘
  266.                                    .
  267.                                    .
  268.                                    .
  269.                  ┌──────────────────────┬─────────────┐
  270.                  │ Image Array Line 800 │ Line Suffix │
  271.                  ├──────────────────────┴─────────────┤
  272.                  │ Image Engineering Trailer          │
  273.                  ├────────────────────────────────────┤
  274.                  │ Image Histogram                    │
  275.                  └────────────────────────────────────┘
  276.  
  277.                  Figure 2-2: Voyager CD-ROM Image Format
  278.  
  279.  
  280. 2.6 CD-ROM FUNDAMENTALS
  281.  
  282.  
  283.    The CD-ROM disk uses the same basic data storage format as a CD audio
  284. disk.  In fact, data blocks are identified by minute, second and sector
  285. number, following the audio format.  Data blocks are recorded along a
  286. spiral from the inner to the outer radius of the disk.  Each raw data block
  287. (sector) contains 2,352 bytes of information, with 304 bytes used for
  288. housekeeping and error correction and 2,048 (2K) containing user data. Each
  289. data block is called a sector, and 75 sectors are stored per second. Since
  290. the nominal playing time of a CD disk is 60 minutes, the data storage
  291. capacity is 75 sectors per second * 60 seconds per minute * 60 minutes or
  292. 270,000 sectors.  Thus the nominal storage capacity of a single CD-ROM disk
  293. is 540,000 kilobytes, which can be extended to more than 600,000 kilobytes
  294. and beyond by recording more than 60 minutes of data on a disk.
  295.  
  296.    In order to maximize the storage capacity of CD disks a constant linear
  297. velocity (CLV) recording format is used.  This means that the player
  298. changes speed (slows down) as it reads from the inside to the outside of
  299. the disk, to maintain a constant flow of data under the read mechanism at a
  300. speed of 1.2 meters per second.  This is in contrast to most magnetic disk
  301. drives which use constant angular velocity (CAV) storage, where the
  302. information density is greater on the inner tracks that the outer tracks.
  303. While the use of CLV recording increases the storage capacity of CD-ROM
  304. disks, it reduces access time, since the disk must change speeds as it
  305. moves to different positions on the disk radius.  The strategy for locating
  306. a recorded data block is also more complicated than with constant angular
  307. velocity recording technology.
  308.  
  309.    As a result the average access time of CD-ROM drives is between 400 ms
  310. and 1 s, and the maximum data transfer rate to the host computer is 150
  311. kilobytes per second.  These rates are approximately an order of magnitude
  312. slower than magnetic disks.  Therefore, the access mechanisms to disk
  313. directories and data must be customized for CD-ROM in order to provide
  314. acceptable performance.
  315.  
  316.    The development of a standard logical format for recording data files on
  317. CD-ROM disks was taken on by a group of CD-ROM applications developers,
  318. hardware vendors and computer vendors.  The proposed standard resulting
  319. from this initial effort was called the High Sierra format. This format was
  320. submitted to the International Standards Organization (ISO) for
  321. consideration and approved on October 5, 1987. It is now referred to as the
  322. ISO-9660 standard.  The format used for the early PDS CD-ROM disks is dated
  323. May 28, 1986, and differs slightly from the final ISO standard.  Microsoft
  324. and other CD-ROM software developers have committed to supporting this
  325. preliminary version of the format in later software releases.  However,
  326. software developed by other vendors to support the ISO format (DEC for
  327. example) will not support the format of these early disks.
  328.  
  329.  
  330.  
  331.                                Chapter 3
  332.  
  333.                           IMDISP INSTALLATION
  334.  
  335.  
  336.    IMDISP requires an IBM PC, XT, AT or 100 percent compatible with 512K of
  337. base memory.  It supports several graphics display devices, including the
  338. Enhanced Graphics Adapter (EGA), the Video Graphics Array (VGA), the
  339. Professional Graphics Adapter (PGA), and the Color Graphics Adapter (CGA).
  340. The hardware environment in which the program has been developed and tested
  341. includes and AT class computer, deluxe or enhanced EGA board with 256K of
  342. memory, selected VGA boards with 512K or 1MB memory, and MultiSync (tm) or
  343. multiscan monitor.
  344.  
  345.  
  346. 3.1 PROGRAM SETUP
  347.  
  348.  
  349.    The IMDISP program can be run from a floppy or hard disk.  To use the
  350. program from a floppy disk, insert the program disk in the A: or B: drive
  351. and type the MS-DOS command: "A:" or "B:" to set the floppy disk as the
  352. default drive.  To use the program from hard disk first create a directory
  353. to hold the IMDISP files.  Use the MS-DOS command "MKDIR \IMDISP" to create
  354. a directory to hold the programs.  Use the "CHDIR \IMDISP" command to make
  355. IMDISP the default directory.  Insert the distribution floppy disk in
  356. floppy disk drive A:.  Now type "COPY A:*.*" to copy the files from the
  357. distribution disk to your hard disk.  You should now be able to run all
  358. examples from that directory on your hard disk.  If you wish to use IMDISP
  359. from other directories, you need to include the IMDISP directory in your
  360. MS-DOS "PATH" command.  This command provides MS-DOS with a list of
  361. directories to search when looking for a program file to run.  If you wish
  362. to run IMDISP from different directories, the \IMDISP subdirectory should
  363. be added to the PATH command in your AUTOEXEC.BAT file.  A sample path
  364. command would look like this:
  365.  
  366.                  PATH=C:\DOS;C:\UTIL;C:\WORDSTAR;C:\IMDISP
  367.  
  368.    You may want to add a line to your AUTOEXEC.BAT file which will allow
  369. you to abort the display program while running batch files or displaying
  370. large image files.  If the command "BREAK=ON" is placed in CONFIG.SYS, you
  371. will (sometimes) be able to terminate the IMDISP program by typing the
  372. control and break keys simultaneously.  Different computer systems offer
  373. varying response to the control-break command, and the use of this command
  374. may effect other programs you use.
  375.  
  376.    You can set IMDISP to start up in the correct display mode for your
  377. video system by specifying the environment variable IMDISP in your
  378. AUTOEXEC.BAT file.  A sample command to do this would look like this:
  379.  
  380.                             SET IMDISP=ORCHID800
  381.  
  382. if you have an Orchid ProDesigner super VGA board with 512K of video
  383. memory.  See section 3.3 for a description of all the possible supported
  384. video modes.
  385.  
  386.    IMDISP also builds various scratch files for use when browsing images or
  387. executing DOS functions.  By default, they go in the root directory on
  388. drive C:.  If you wish to have them written somewhere else, you may do that
  389. by specifying the desired directory in the environment variable IMBROWSE. A
  390. sample command to do this would look like this:
  391.  
  392.                            SET IMBROWSE=D:\TEMP\
  393.  
  394. This will make IMDISP write its scratch files in the subdirectory TEMP on
  395. drive D:.  Note that the final backslash (\) is required.  We recommend
  396. that the drive specified by IMBROWSE have at least 512K of free space - the
  397. scratch file written when using any of the DOS system calls can be as large
  398. as that.
  399.  
  400. Also, if you have a collection of color palettes in a separate
  401. subdirectory, you can specify this directory as being the default palette
  402. directory.  For example:
  403.  
  404.                      SET IMPALETTE=D:\IMAGES\PALETTES\
  405.  
  406. will tell IMDISP to look in the D:\IMAGES\PALETTES directory first when
  407. loading in a color palette with the PAL LOAD command.
  408.  
  409. IMDISP can use extended memory, managed by an XMS memory driver like
  410. HIMEM.SYS or QEMM, for its refresh buffer.  If no extended memory is
  411. available, IMDISP will not set up a refresh buffer by default, but will
  412. allow the user to open a disk file to be used for refreshing the screen. In
  413. this case, the environment variable IMREFRESH defines where the refresh
  414. buffer is to go, so
  415.  
  416.                              SET IMREFRESH=G:\
  417.  
  418. tells IMDISP to put the refresh buffer in the root directory of drive G:.
  419. Note that the refresh buffer can be quite large - a 1024x768 display will
  420. require 768K of disk space (or XMS memory) to hold the entire buffer.
  421.  
  422.  
  423. 3.2 CD-ROM SETUP
  424.  
  425.  
  426.    To use the IMDISP program with PDS CD-ROM disks you will need a CD-ROM
  427. reader, interface board, and software provided by the vendor which will
  428. make your CD Reader look like a disk drive to your PC.  The details of
  429. setting up your hardware and software configuration are beyond the scope of
  430. this manual, however several aspects of setup will be reviewed.
  431.  
  432.    There are many potential pitfalls in setting up your hardware and
  433. interface board.  Read the directions carefully, and don't assume that
  434. "default" switch settings are correct.  Check all switches to see that they
  435. correspond to the recommended settings.
  436.  
  437.    To work properly with the batch command and label files provided with
  438. IMDISP, your CD-ROM drive should be set up to be drive letter "L:". Most
  439. vendor software allows you to select the drive letter which will be
  440. assigned to the CD-ROM reader.
  441.  
  442.  
  443. 3.2.1 Microsoft Extensions
  444.  
  445.  
  446.    If you are using the Microsoft Extensions you will load a CD-ROM device
  447. driver as part of your CONFIG.SYS file (or two drivers if using the Philips
  448. or DEC readers) with a line like this:
  449.  
  450.    DEVICE=HITACHI.SYS /D:CDROM1 /N:1
  451.  
  452. This command assumes that the driver file "HITACHI.SYS"is located in your
  453. ROOT directory.  The /D:CDROM1 switch assigns a logical name CDROM1 to the
  454. drive.  A name must be supplied, and is used to identify this device, in
  455. case more than one CD-ROM drive is being used on your system. The name
  456. should not be the same as the name of any file stored on your system.  An
  457. attempt to open a file with the same name as the device driver will result
  458. in the device driver being opened, not the file.  The /N:1 switch indicates
  459. that this is drive 1.  This switch is used since some CD-ROM interface
  460. cards support multiple drives.
  461.  
  462.    Other commands which should be included in CONFIG.SYS if you are using a
  463. CD-ROM drive with the Microsoft Extensions are:
  464.  
  465.    LASTDRIVE=Z
  466.    FILES=30
  467.    BUFFERS=50
  468.  
  469.    The LASTDRIVE command tells MS-DOS to allow for enough drive letters to
  470. support the CD-ROM drive, plus any other drives on your system. Using
  471. LASTDRIVE=L should also work in most circumstances.  The files and buffers
  472. specifications provide sufficient system work area to support CD-ROM
  473. operations.
  474.  
  475.    You must also execute a program called MSCDEX.EXE which allows access to
  476. the CD-ROM drive as if it were a disk drive on your system.  This command
  477. can be put in your AUTOEXEC.BAT file so that it is automatically run
  478. whenever you start-up your computer.  The command format is:
  479.  
  480.    MSCDEX /D:CDROM1 /L:L /M:20 /V /E
  481.  
  482.    Several MSCDEX command switches are illustrated.  The /L:L command
  483. assigns the drive name L: to the CD-ROM drive.  The /D switch gives the
  484. device name of the CD-ROM drive (which must be the same name used in the
  485. device name parameter of  the "DEVICE=CDROM.SYS" command in the CONFIG.SYS
  486. file.  The /M:20 switch assigns twenty 2K blocks of memory as a buffer for
  487. use with CD-ROM data.  The /V switch provides verbose messages when the
  488. installation program is run, and /E tells the program to use expanded
  489. memory for the cache area.
  490.  
  491.  
  492. 3.2.2 Other Driver Software
  493.  
  494.  
  495.    Some vendors (Reference Technology, TMS) offer CD-ROM software which is
  496. comparable to the Microsoft Extensions.  Our experience with these software
  497. packages is that they modify the internals of MS-DOS and may cause
  498. unpredictable results with your other PC software.  They often do not
  499. support CD-ROM applications designed to work with the MS-DOS extensions for
  500. CD-ROM and cannot be used with the IMDISP FILE prompt mode.
  501.  
  502.  
  503. 3.2.3 Problems with CD-ROM Software
  504.  
  505.  
  506.    The PDS CD-ROM disks utilize a feature of the CD-ROM format standard
  507. which provides extended attribute records to define the physical
  508. characteristics of data files.  These records will be used by VAX and other
  509. minicomputer systems where the operating system allows a variety of record
  510. formats (fixed, variable, stream).  Many of the earlier implementations of
  511. High Sierra software failed to recognize these records, which are placed at
  512. the beginning of a file's data area.  If your CD-ROM software was developed
  513. prior to April 1987, it may interpret these records as part of the data
  514. file, causing the first 2K bytes of each file to appear as meaningless
  515. binary data.  Users with this problem should contact their hardware or
  516. software vendors for updated versions of the CD-ROM software.  The IMDISP
  517. program has been patched to recognize and skip over these records on the
  518. PDS CD-ROM disks, but these patches may not support other CD-ROM disks with
  519. extended attribute records.
  520.  
  521.  
  522. 3.3 DISPLAY DEVICE CHARACTERISTICS
  523.  
  524.  
  525.    IMDISP automatically finds out which display devices are available (PGA,
  526. EGA, or CGA) and uses the one available.  The Enhanced Graphics Adapter
  527. must have at least 128K of memory to work properly.  Use of the Color
  528. Graphics Adapter is discouraged because the pixels have no gray levels,
  529. only black or white.
  530.  
  531.    The display coordinates start at (1,1) in the upper left corner of the
  532. screen; the line direction is down and the sample direction is to the
  533. right.
  534.  
  535.  
  536. 3.3.1 Enhanced Graphics Adapter (EGA)
  537.  
  538.  
  539.    The EGA is a bit-mapped display device providing a resolution of 350
  540. lines by 640 samples of 4-bits each.  It produces a digital video signal
  541. for each primary color (red, green and blue), The video signal for each
  542. color can be set to one of four levels, roughly equivalent to off, low,
  543. medium and high.  Thus the number of possible colors (color palette) is 64
  544. (4^3).  The following table illustrates the colors created by some of the
  545. different combinations of red, green and blue.
  546.  
  547.       Red=   off, Green=   off, Blue=   off  results in Black
  548.       Red=   low, Green=   off, Blue=   off  results in Dark Red
  549.       Red=medium, Green=   off, Blue=   off  results in Light Red
  550.       Red=  high, Green=   off, Blue=   off  results in Bright Red
  551.       Red=   low, Green=   low, Blue=   low  results in Dark Gray
  552.       Red=medium, Green=   low, Blue=   off  results in Brown
  553.       Red=medium, Green=medium, Blue=   off  results in Yellow
  554.       Red=medium, Green=medium, Blue=medium  results in Light Gray
  555.       Red=  high, Green=   low, Blue=   off  results in Orange
  556.       Red=  high, Green=  high, Blue=  high  results in White
  557.  
  558.               Table 3-1: Sample EGA Color Palette Settings
  559.  
  560.  
  561.    The EGA display is limited to only 16 colors out of the 64 possible,
  562. because only 4-bits are used to store each pixel value in memory.  This
  563. 4-bit pixel value points to an entry in the color table which represents
  564. one of the 64 possible combinations of red, green and blue which can be
  565. displayed.
  566.  
  567.    Many of the newer EGA boards are capable of displaying additional lines
  568. and samples when using a MultiSync (tm) or Multiscan monitor.  The standard
  569. EGA uses a 16 Mhz crystal oscillator (something like a clock which
  570. regulates the display speed), which limits the video output rate to the
  571. equivalent of 640 pixels by 350 lines.  The EGA circuitry allows for a
  572. faster crystal oscillator to be added to the board (24 Mhz and beyond)
  573. allowing about 25 percent more lines to be displayed (480 lines instead of
  574. 350).  A method for adding this capability to an existing EGA board (for
  575. about $10 worth of parts) is described in the September 16, 1986 issue of
  576. PC Magazine.
  577.  
  578.    This mode requires that a MultiSync (tm) or multiscan monitor be
  579. attached to the computer, and there is no way for the program to
  580. automatically detect the presence of the special monitor.  Therefore this
  581. display mode is invoked by specifying an MS-DOS "ENVIRONMENT" variable. This
  582. is done by issuing an MS-DOS "SET" command at the MS-DOS prompt as follows:
  583.  
  584.    SET IMDISP=EGA480
  585.  
  586.    This command can also be put in your AUTOEXEC.BAT file using a text
  587. editor, so that you need not invoke it each time you run IMDISP.  It should
  588. have no effect on other MS-DOS system operations.  There is a chance that
  589. adding this variable will exceed the size reserved by MS-DOS for environment
  590. variables.  If so, you should consult your MS-DOS manual to increase the
  591. environment size on your system.  The environment variable can be removed
  592. with the MS-DOS command:
  593.  
  594.    SET IMDISP=
  595.  
  596. where a carriage return is typed immediately after the equal sign. The 480
  597. line mode requires an additional 83K of memory for the refresh buffer.  If
  598. you try this mode and receive the message "Insufficient memory for line
  599. buffer", it is probably because you have a 512K memory machine, or have
  600. memory resident programs operating (like Sidekick or Superkey) which reduce
  601. the available memory to less than about 400K. You will need to use the 350
  602. line mode or remove some memory resident programs to operate in 480 line
  603. mode.
  604.  
  605.    Users of the EGA with MultiSync (tm) and Multiscan monitors can achieve
  606. a 16 gray level display through the use of a special device called the
  607. Grayscaler 1, from Avocado Computer, Box 632, Yorba Linda, Ca, 92686, (714)
  608. 528-1025.  This cable converts the digital video signals produced by the
  609. EGA board to analog signals.  By selecting appropriate EGA palette entries,
  610. a fairly good representation of 16 gray levels can be achieved (use the
  611. palette selection "PAL LOAD GRAY16.PAL" to select this palette).
  612.  
  613.  
  614. 3.3.2 Video Graphics Array (VGA)
  615.  
  616.  
  617.    This version (5.7) of the IMDISP program includes support for the IBM
  618. Video Graphics Array (VGA) display device.  The VGA produces an analog
  619. display with several new color modes.  Of particular interest to IMDISP
  620. users are the 640 x 480 line mode with 16 displayable colors (or gray
  621. levels).  The 320 x 200 line mode with 256 displayable colors (or 64 gray
  622. levels) has been tested but produces very blocky pixels.  This version of
  623. IMDISP also supports a number super VGA graphic boards (see below).
  624.  
  625.    To set the VGA display mode you must set a MS-DOS environment variable
  626. prior to executing IMDISP.
  627.  
  628.    To set the environment variable use the MS-DOS command:
  629.  
  630.    SET IMDISP=VGA
  631.  
  632. This will put the display in 640 sample by 480 line mode, with 16 gray
  633. levels or colors displayable from a palette of 256K.  The display is
  634. initialized with a gray scale palette, but a pseudocolor palette can be
  635. invoked with the IMDISP command "PAL PS 0".  The "PALETTE EDIT" command
  636. will allow you to step forward or backward through the 64 available shades
  637. for each primary color.  See the next section of the IMDISP manual for more
  638. information on the palette edit function.
  639.  
  640.  
  641.    Users may experiment with the 320 x 200 VGA mode by using
  642.  
  643.    SET IMDISP=VGA320
  644.  
  645. The pixels are rather large in this mode, but there are enough colors to
  646. display images nicely.
  647.  
  648.  
  649. 3.3.3 Professional Graphics Adapter (PGA)
  650.  
  651.  
  652.    The PGA is a special graphics board developed by IBM for use with
  653. CAD/CAM applications on the IBM PC.  Because its architecture is
  654. incompatible with the CGA and EGA boards, it has not been well received by
  655. software developers.  The PGA provides an analog video signal with a
  656. display resolution of 480 lines by 640 samples of 8-bits each.  It provides
  657. 16 intensities for each primary color, resulting in a palette of 4,096
  658. colors (16^3).  The color table allows 256 colors to be displayed
  659. simultaneously, however only 16 gray levels can be selected.
  660.  
  661.    Use the command:
  662.  
  663.    SET IMDISP=PGA
  664.  
  665. at the MS-DOS prompt to force IMDISP to go into PGA display mode.
  666.  
  667.  
  668. 3.3.4 Color Graphics Adapter (CGA)
  669.  
  670.  
  671.    The CGA display is a bit-mapped graphics device with a resolution of 200
  672. lines by 640 samples of 1-bit each.  It supports only 2 colors in this
  673. display mode, black and white.  This display can be used to get a general
  674. idea of the contents of a digital image, or for displaying one bit images
  675. (graphics for example) but is not recommended for use with the PDS CD-ROM
  676. images.
  677.  
  678.    To force a multi-function display card into CGA mode, use:
  679.  
  680.    SET IMDISP=CGA
  681.  
  682.  
  683. 3.3.5 Super VGA Display Boards
  684.  
  685.  
  686.    Several high resolution display boards are supported by this version of
  687. IMDISP.   Most of them support resolutions with 256 colors or 64 grayscale
  688. levels.  Select one from the following list if it matches your display
  689. board:
  690.  
  691.        SET IMDISP=     Resolution     Board Name
  692.            ATI640      640x480x256    ATI VGA Wonder Board (512K)
  693.            ATI800      800x600x256    ATI VGA Wonder Board (512K)
  694.            ATI1024     1024x768x16    ATI VGA Wonder Board (512K)
  695.            EVGA512     512x480x256    Everex EV-673 Board  (256K)
  696.            EVGA640     640x400x256    Everex EV-673 Board  (256K)
  697.            ORCHID      640x480x256    Orchid ProDesigner+ Board (512K)
  698.            ORCHID800   800x600x256    Orchid ProDesigner+ Board (512K)
  699.            ORCHID1024 1024x768x256    Orchid ProDesigner+ Board (1MB)
  700.            PARADISE    640x480x256    Paradise VGA Board (400 lines if the
  701.                                       board has 256K of memory)
  702.            TRIDENT     640x480x256    Trident-based SVGA boards (512K)
  703.            VESA       1024x768x256    VESA SVGA Interface (1MB) (test)
  704.  
  705.  
  706. 3.4 MULTIPLE BUFFERS
  707.  
  708. Multiple copies of images (or the entire screen) can now be copied and
  709. stored away into buffers, limited by the available memory.  If you don't
  710. have enough memory, the buffers can still be used, but as virtual files
  711. (see HINTS & TIPS ON CONSERVING MEMORY, down below).  Using the buffers,
  712. images can now be merged together to create interesting effects.  You can
  713. add or subtract images from each other.  You can store an image away into a
  714. buffer before applying a filter, and if you didn't like the result, then
  715. retrieve it back from the buffer, effectively creating an UNDO feature.
  716. You can create a "face-on-Venus image" by merging the face-on-Mars image
  717. with a Magellan image.
  718.  
  719. There are 26 buffers available in IMDISP, limited by memory or disk space.
  720. The buffers are referenced by name as a single letter, one for each letter
  721. of the alphabet (A-Z).
  722.  
  723.  
  724. 3.5 HINTS & TIPS ON CONSERVING MEMORY
  725.  
  726. If you have no extended memory, or don't have enough extended memory, don't
  727. despair.  You can still use the buffers if you use the following tips to
  728. help you maximize the use of the memory
  729.  
  730.      o IMDISP will automatically create a refresh buffer in extended memory
  731.        whose size is he size of the screen.  You can disable the refresh
  732.        buffer and this memory will be freed up for buffer use.  To disable
  733.        the refresh buffer, type:
  734.  
  735.            SET REFRESH OFF
  736.  
  737.        The refresh buffer can be enabled with
  738.  
  739.            SET REFRESH ON
  740.  
  741.      o IMDISP will also attempt to load an entire image into extended
  742.        memory whenever you do the FILE command.  You can have IMDISP not do
  743.        this by using the NOMEMORY option:
  744.  
  745.            FILE IO.IMG NOMEMORY
  746.  
  747.      o If you are using a Super VGA graphics card in its highest
  748.        resolution, then if you switch to a lower screen resolution, this
  749.        will generally cause the buffers to be smaller.  For example, if you
  750.        using an Orchid Pro Designer II card in its highest resolution
  751.        (1024x768), then you can switch to the 800x600 or 640x480 screen
  752.        resolutions:
  753.  
  754.             SET DIS ORCHID800
  755.             SET DIS ORCHID
  756.  
  757.      o Subsample the image so that it doesn't take up the entire screen,
  758.        which then can be saved to smaller buffers:
  759.  
  760.              DISP SUB 3
  761.  
  762.      o Use the FILE option on the COPY or MERGE commands to store buffers
  763.        into a file instead of extended memory.
  764.  
  765.      o Erase any unused buffers:
  766.  
  767.               ERASE A
  768.  
  769.                                  Chapter 4
  770.  
  771.                               IMDISP OPERATION
  772.  
  773.  
  774.    IMDISP can be used to display images up to several thousand lines and
  775. samples with a variety of pixel formats.  These formats include bit (1
  776. bit), nibble (4 bits), byte (8 bits), integer (16 bits) or long integer (32
  777. bits).  Integer pixels may be byte-swapped, which means that the sign and
  778. most significant 7 bits are in the rightmost byte, and the least
  779. significant 8 bits are in the leftmost byte.  This is the convention used
  780. by both the IBM PC and VAX computer hardware families. IBM mainframes and
  781. 68000 series computers (Macintosh and Sun, for example) use un-byte-swapped
  782. integers.
  783.  
  784.    Program interaction with the user is via commands typed in response to
  785. the "COMMAND:" prompt.  Most interaction is performed on the graphic
  786. display screen, and program messages are printed over any image display
  787. currently on the screen.  The REFRESH command can be used to restore an
  788. image after other commands have written text over the display.  The ERASE
  789. command can be used to clear away the clutter left by program status
  790. messages and previously displayed images.  The screen is not automatically
  791. erased after each operation in order that multiple images can be displayed
  792. simultaneously, or so a histogram can be placed on the screen with the
  793. image.
  794.  
  795.    IMDISP is invoked by typing "IMDISP" or "IMDISP filename", where
  796. filename is the name of an image file to be opened for processing at
  797. program start-up.  The filename may include a disk drive and path name
  798. specification.
  799.  
  800.    The program will blank the display screen and display a welcome logo,
  801. then the prompt "COMMAND:" will appear in the lower left portion of the
  802. screen.  If a filename is included in the command invocation, the welcome
  803. message is not displayed and the screen will display the COMMAND: prompt.
  804.  
  805.    Typing "HELP" at the command prompt will provide a list of IMDISP
  806. commands.  The most frequently used commands are "FILE" to open a file for
  807. processing, and "DISPLAY" to display an image once the file has been
  808. opened.
  809.  
  810.  
  811. 4.1 COMMAND SYNTAX
  812.  
  813.  
  814.    The command line syntax is of the form:
  815.  
  816.   COMMAND KEYWORD1 = VALUE1 KEYWORD2=VALUE2 KEYWORD3 VALUE3 ...
  817.  
  818.    The command line may be typed in either upper or lower case.  The
  819. command and the keyword names may be abbreviated to 3 characters in most
  820. cases.  Any number of spaces may be inserted between words, and the keyword
  821. and value may be separated by a space or an equals sign.  Some keywords do
  822. not require a value.  All keywords are optional and have default values.
  823.  
  824.  
  825. 4.2 COMMAND DESCRIPTION
  826.  
  827.  
  828.    Table 4-1 presents a summary of IMDISP commands.  They are separated
  829. into 3 groups, file manipulation commands; display commands and program
  830. control commands.  Only the capitalized letters are required to specify a
  831. command.
  832.  
  833.  
  834. 4.3 OPERATING MODES
  835.  
  836.  
  837.    Several of the commands invoke special program operating modes. These
  838. include the FILE command when issued without a filename argument and the
  839. CURSOR, PROFILE and PALETTE EDIT commands.  The FILE mode displays a list
  840. of files in the current directory on the screen for selection.  It also
  841. contains several subcommands for controlling the display of files on the
  842. menu screen.  In the CURSOR, PROFILE and PALETTE EDIT commands the cursor
  843. keys (arrow keys) on the numeric keypad are used in conjunction with other
  844. keys to control program operation.  These modes are exited by typing either
  845. a period '.' or carriage return.
  846.  
  847. File oriented commands:
  848.  
  849.     CD or CHDIR .  .  .  .  to change the default directory
  850.     DIRECTORY   .  .  .  .  to perform the MS-DOS directory command
  851.     FILE        .  .  .  .  to specify the name of the image
  852.     LABEL       .  .  .  .  to display the image labels
  853.     LOG         .  .  .  .  to save (log) commands to a text file
  854.     SAVE        .  .  .  .  to save the image display to a file
  855.     TYPE        .  .  .  .  to perform the MS-DOS type command
  856.  
  857. Display commands:
  858.  
  859.     BROWSE      .  .  .  .  to display a group of images
  860.     CURSOR      .  .  .  .  to move the cursor around
  861.     DISPLAY     .  .  .  .  to display the image
  862.     ERASE       .  .  .  .  to erase the display
  863.     HISTOGRAM   .  .  .  .  to display the histogram of the image
  864.     OVERLAY     .  .  .  .  to place an overlay on the image
  865.     PALETTE     .  .  .  .  to adjust the palette for the display
  866.     PERSPECTIVE .  .  .  .  to plot a pseudo-perspective of the image
  867.     PLOT        .  .  .  .  to plot image lines and spectra on the display
  868.     PROFILE     .  .  .  .  to plot a profile of the image
  869.     REFRESH     .  .  .  .  to refresh the image plane
  870.     SET         .  .  .  .  to set display options
  871.     TEXT        .  .  .  .  to draw text on the image
  872.  
  873. Image processing commands:
  874.  
  875.     BRIGHTEN    .  .  .  .  to brighten the image
  876.     COPY        .  .  .  .  to copy images to/from memory buffers
  877.     DARKEN      .  .  .  .  to darken the image
  878.     ENHANCE     .  .  .  .  to apply various filters to the image:
  879.          BAALKE
  880.          CONVOLUTION
  881.          EDGE
  882.          LOG
  883.          MEAN
  884.          MEDIAN
  885.          POWER
  886.          STAIR
  887.          SMEAR
  888.          UNSHARP
  889.     MASK        .  .  .  .  to mask off pixels in the image
  890.     MERGE       .  .  .  .  to combine image and memory buffers
  891.     NEG         .  .  .  .  to invert the color palette
  892.     PALETTE     .  .  .  .  to adjust the palette for the display
  893.     SLANT       .  .  .  .  to slant the image to the right or left
  894.     STRETCH     .  .  .  .  to do a linear gray scale stretch
  895.  
  896.  
  897. Program control commands:
  898.  
  899.     BATCH       .  .  .  .  to execute a batch command file
  900.     EXIT or QUIT.  .  .  .  to exit from the program
  901.     HELP        .  .  .  .  Display help information
  902.     MENU        .  .  .  .  to select images from a menu file
  903.     SYSTEM      .  .  .  .  execute an MS-DOS command
  904.  
  905.          Table 4-1: IMDISP Command Summary
  906.  
  907.  
  908. 4.4 ERROR HANDLING
  909.  
  910.  
  911.    If an invalid command is issued at the COMMAND: prompt the program will
  912. beep and return to the COMMAND: prompt.  In handling command parameters the
  913. program takes action on those parameters that are recognized, but ignores
  914. invalid parameters.
  915.  
  916.    It is also possible for certain system errors to be encountered which
  917. cause the program to abort leaving your computer in graphics mode.  If you
  918. are using certain utilities which reset the default text mode screen colors
  919. (like the Norton Utilities screen attributes command) you may not be able
  920. to see what is being printed on the screen.  The simplest approach is to
  921. perform a warm boot, by typing the Ctrl, Alt, Del  keys simultaneously.
  922. Alternately, you can often type IMDISP then EXIT to reset the computer to
  923. text mode.  Errors in processing image files on CD-ROM, hard disk or floppy
  924. disks can cause these aborts.
  925.  
  926.  
  927. 4.5 COMMAND REFERENCE
  928.  
  929.  
  930.    This section lists all IMDISP commands alphabetically and describes
  931. their function, parameters which control  command operation, and provides
  932. examples of command use, In the command and parameter description the
  933. following conventions are used:
  934.  
  935.    filename    represents the name of an MS-DOS file, and may include an
  936.                optional drive identifier and path specification.
  937.  
  938.    n           represents an integer value.
  939.  
  940.  
  941. 4.5.1 BATCH
  942.  
  943.  
  944.    The BATCH command reads commands from the specified batch command file.
  945. If no file name is specified the current directory is searched for a file
  946. named BATCH.CMD.  The CURSOR, PROFILE and PALETTE EDIT commands should not
  947. be used within batch command files since they require interactive inputs
  948. from the keyboard.  Batch files may be nested.
  949.  
  950.    The BATCH command may take the following argument:
  951.  
  952.    filename    filename of batch command file.
  953.  
  954.    A batch file is simply a text file containing a list of commands, with
  955. each command terminated by a carriage return.  You can add comments to a
  956. batch file by putting a semi-colon on the line.  Everything from the
  957. semi-colon to the end of the line is ignored.  If the command file is
  958. created with a word processor, the program should be used in the
  959. non-document mode, to assure that carriage returns are embedded between
  960. command lines.  An example of creating a batch file to display the PDS logo
  961. image follows.
  962.  
  963.    At the MS-DOS command level type:
  964.  
  965.    COPY CON TEST.CMD
  966.    FILE LOGO.IMG
  967.    DISP ZOOM 4
  968.    DISP ZOOM 2
  969.    DISP
  970.    DISP SUB 2
  971.    EXIT
  972.  
  973.    Now run IMDISP and type "BATCH TEST.CMD" at the "COMMAND:" prompt. Make
  974. sure the file "LOGO.IMG" is in your current directory.  The PDS logo should
  975. be displayed on the screen in several different sizes.
  976.  
  977.  
  978. 4.5.2 BRIGHTEN
  979.  
  980.    The BRIGHTEN command adds a constant value to all pixels in the
  981. displayed image.  If no value is specified, the default is 10% of the total
  982. range of DN values (i.e., 2 will be added to all pixels in 16-color modes,
  983. 26 will be added in 256 color modes).
  984.  
  985.     Examples:
  986.  
  987.        BRIGHTEN
  988.        BRIGHTEN 50
  989.  
  990. 4.5.3 BROWSE
  991.  
  992.  
  993.    The BROWSE command will display all images in a directory one after
  994. another.  An optional directory mask can be supplied to display only
  995. selected files ("BROWSE *.IMG").  The command creates a list of files to be
  996. displayed, then creates and executes a batch command file to display those
  997. images.  After each image is displayed, the filename is displayed at the
  998. top of the image.  A BROWSE session can be interrupted by pressing
  999. control-s, then restarted by pressing control-q TWICE.  A session can be
  1000. halted by typing any other key during the display.  It can then be
  1001. restarted (from the beginning) with the command "BROWSE C:BATCH.CMD". The
  1002. default file name for the batch file created by the BROWSE command is
  1003. 'C:BATCH.CMD'.  This name can be changed using the "SET BROWSE fname"
  1004. command where fname can consist of a drive letter and filename, which
  1005. should be terminated  with the extension ".CMD".  It can also be set from
  1006. DOS or in your AUTOEXEC.BAT file by using the environment variable
  1007. IMBROWSE.   For example, the DOS command
  1008.  
  1009.    SET IMBROWSE=D:\TEMP\BROWSE.CMD
  1010.  
  1011. will make the create the BROWSE command file in the subdirectory TEMP on
  1012. drive D:.
  1013.  
  1014.    The BROWSE command has one argument and several optional keywords.
  1015.  
  1016.    fname         optional file selection mask (must immediately follow the
  1017.                  command BROWSE).
  1018.                  Examples: *.img, D:\IMAGES\*.IMG, L:*.BRS.
  1019.  
  1020.    SIZe n        allows the display of multiple images on the screen.  For
  1021.                  example, on a 640x480 VGA display, six 200x200 images can
  1022.                  be displayed adjacent to each other.
  1023.  
  1024.    SUBsample n   used in conjunction with the SIZE command, to scale each
  1025.                  image to fit in the SIZE specification.  Same as SUB
  1026.                  option used with the DISPLAY command.
  1027.  
  1028.    NOLabel       inhibits writing the file name label at the top of each
  1029.                  image as it is displayed.  The default is that labels are
  1030.                  enabled.
  1031.  
  1032.    DNLow DNHigh  sets the DN range for all images (see SET).
  1033.  
  1034.    PAUse n       pauses display for n seconds when the screen gets full.
  1035.  
  1036.    ALL           searches all subdirectories in addition to the current
  1037.                  directory, looking for files matching the mask.
  1038.  
  1039.    AUToset n     sets DNLO adn DNHI to n% of the full range, based on the
  1040.                  image histogram.  The default is 5%.
  1041.  
  1042.    SELect        interactively selects files as they are being displayed
  1043.                  and writes the filenames out to a "select" file. The
  1044.                  default select file is "C:\IMDISP.SEL" and this can be
  1045.                  changed by using the SET SELECT command.
  1046.  
  1047.    FILe fname    select files to browse from a file instead of using a
  1048.                  mask.  The file will contain a list of files, and the list
  1049.                  can have wildcarded names.  The filename can also be the
  1050.                  IMDISP.SEL file created earlier with the SELect option.
  1051.  
  1052.    BUFFERS       browses through all the memory buffers which have been
  1053.                  created.
  1054.  
  1055.    EXAMPLES:
  1056.  
  1057.        BROWSE *.* SIZE 200 SUBSAMPLE 4
  1058.  
  1059. will display all the files in the current directory, subsampling each by 4
  1060. and displaying them in a 200 x 200 window.  The command:
  1061.  
  1062.        BROWSE *.IBG SIZE 100 SUB 2 PAUSE ALL
  1063.  
  1064. when used with the Voyager browse images will display all of the browse
  1065. images on the screen (including the subdirectories), pausing each time
  1066. the screen fills up with images.
  1067.  
  1068.        BRO *.* SIZE 200 ALL SELECT NOLABEL
  1069.  
  1070. will allow the selection of individual images and
  1071.  
  1072.        BRO FILE C:\IMDISP.SEL SIZE 200
  1073.  
  1074. will redisplay the images that you just selected.
  1075.  
  1076.        BROWSE BUFFERS PAUSE
  1077.  
  1078. displays the contents of each buffer, pausing in between each display.
  1079.  
  1080.        BRO BUFFERS SIZE 100 SUB 4
  1081.  
  1082. displays a small version of each buffer.
  1083.  
  1084. *** NOTE ***
  1085.  
  1086.    BROWSE does not distinguish between image and non-image files, and it is
  1087. up to the user to provide the appropriate directory mask to select ONLY
  1088. images.  If a message "Image does not have proper label" comes up on the
  1089. screen during BROWSE, it is probably because a non-image file is in the
  1090. directory you are browsing.   You can type carriage returns several times
  1091. to get back to the "COMMAND:" prompt, and the browse will continue.
  1092.  
  1093.    If you are using BROWSE on a computer without a hard disk, you will have
  1094. to use the SET BROWSE command to change the default browse file name to a
  1095. writable disk drive,  for example: "SET BROWSE A:BROWSE.CMD". If you are
  1096. using BROWSE to view files on a CD-ROM disk, be sure to include the drive
  1097. letter of a writable disk  drive if you specify a BROWSE file name.  The
  1098. text editor to produce your own custom command files.
  1099.  
  1100.  
  1101. 4.5.4 CD or CHDIR
  1102.  
  1103.  
  1104.    The CD or CHDIR command is used just as it is at the MS-DOS command level
  1105. to change the current default directory.
  1106.  
  1107.    The  argument  of the CD command is the  path  name specification of the
  1108. new default directory.  For example, "CD \IMDISP\IMAGES" would make
  1109. \IMDISP\IMAGES the current directory if it exists.  To change the current
  1110. default drive use the "SYSTEM" command ("SYSTEM L:"  for example) or the
  1111. "FILE" command.  If there is not enough memory available for the system
  1112. command to be executed an error message is displayed.
  1113.  
  1114.  
  1115. 4.5.5 COPY
  1116.  
  1117. The COPY command will attempt to copy the image last displayed with the
  1118. DISPLAY command, the screen or another buffer to a destination buffer.
  1119. IMDISP will attempt to put the buffer into extended memory.  An FILE option
  1120. is provided to allow the buffer to be put into a file on the disk.
  1121.  
  1122.         COPY  buffer [FILe]
  1123.         COPY  TO buffer [FILe]
  1124.         COPY  source TO buffer [FILe]
  1125.  
  1126.       where buffer = A-Z
  1127.       where source = A-Z or SCReen
  1128.  
  1129. Examples:
  1130.  
  1131. COPY A                Copies the last displayed image to buffer A
  1132. COPY A TO B           Copies buffer A to buffer B
  1133. COPY A TO B FILE      Copies buffer A to buffer B, buffer B is a file
  1134. COPY SCREEN TO Z      Copies the entire screen to buffer Z
  1135.  
  1136.  
  1137. 4.5.6 CURSOR
  1138.  
  1139.  
  1140.    The CURSOR command is used to select a point in a displayed image for
  1141. subsequent display commands.  When first invoked, it places a small cursor
  1142. symbol at the center of the screen.  Depending on the current contents of
  1143. the screen, the cursor may be hard to see.  Moving it with the arrow keys
  1144. on the numeric keypad will help you locate it.  If you have a mouse, it
  1145. will also move the cursor around.
  1146.  
  1147.    Whenever the cursor is moved, the current line and sample location of
  1148. the cursor and the DN value of the pixel at that point is printed in the
  1149. lower right portion of the screen.  The cursor will move 16 pixels in the
  1150. selected direction unless the movement value is adjusted using the + or
  1151. keys.
  1152.  
  1153.                           Numeric Keypad Keys
  1154.                     ┌──────┬──────┬───────┬───────┐
  1155.                     │  7   │  8   │  9    │ PrtSc │
  1156.                     │ Home │ Up   │ PgUp  │       │
  1157.                     ├──────┼──────┼───────┼───────┤
  1158.                     │  4   │  5   │  6    │  -    │
  1159.                     │ Left │      │ Right │       │
  1160.                     ├──────┼──────┼───────┼───────┤
  1161.                     │  1   │  2   │  3    │  +    │
  1162.                     │ End  │ Down │ PgDn  │       │
  1163.                     └──────┴──────┴───────┴───────┘
  1164.  
  1165.                          Action of Keypad Keys:
  1166.  
  1167.                   7 = Move up and left.
  1168.                   8 = Move up.
  1169.                   9 = Move up and right.
  1170.                   4 = Move left.
  1171.                   5 = Not active.
  1172.                   6 = Move right.
  1173.                   1 = Move down and left.
  1174.                   2 = Move down.
  1175.                   3 = Move down and right.
  1176.                   - = Decrement cursor movement value.
  1177.                   + = Increment cursor movement value.
  1178.  
  1179.  
  1180.                      Table 4-2: IMDISP Cursor Keys
  1181.  
  1182.    Cursor mode is exited by typing a "." (period) or carriage return or by
  1183. tapping the left button on the mouse.  The cursor position is retained for
  1184. future use in DISPLAY commands which use the CENTER option.  It is very
  1185. useful with large images where the entire image may be displayed using the
  1186. subsample option, then a point selected for subsequent display at full
  1187. resolution.
  1188.  
  1189.    You can specify the starting position of the cursor with the subcommands
  1190. DSL (Display Starting Line) and DSS (Display Starting Sample).  Otherwise,
  1191. the cursor starts off at the position where it was left last.
  1192.  
  1193.    Example: Type "FILE MONTAGE.IMG" followed by "DISP" to display the
  1194. MONTAGE.IMG file.  Type "CUR" to enter the cursor mode, then move the
  1195. cursor to the center of the Uranus image in the upper left corner of the
  1196. image using the up and left arrow keys.  Now type "." to exit cursor mode,
  1197. then type "DISP ZOOM 4 CENTER" which will display Uranus as a large grainy
  1198. ball on the screen.
  1199.  
  1200.  
  1201. 4.5.7 DARKEN
  1202.  
  1203.    The DARKEN command subtracts a constant value from all pixels in the
  1204. displayed image.  If no value is specified, the default is 10% of the total
  1205. range of DN values (i.e., 2 will be subtracted from all pixels in 16-color
  1206. modes, 26 will be subtracted in 256 color modes).
  1207.  
  1208.    Examples:
  1209.  
  1210.    DARKEN
  1211.    DAR 100
  1212.  
  1213.  
  1214. 4.5.8 DIR
  1215.  
  1216.  
  1217.    The DIR command is used just as the MS-DOS dir command.  Its argument is
  1218. passed to MS-DOS for execution.  At the end of the directory listing the
  1219. screen will display "Type carriage return to continue:" which will return
  1220. to the IMDISP command mode.  If there is not enough memory available for
  1221. the system command to be executed an error message is displayed.
  1222.  
  1223.  
  1224. 4.5.9 DISPLAY
  1225.  
  1226.  
  1227.    The DISPLAY command reads an image file and displays it on the the
  1228. screen.  If the image is larger than the display screen, the default mode
  1229. is to display as much of the upper left portion of the image as will fit on
  1230. the screen.  The SUBSAMPLE keyword can be used to select every 'n' lines
  1231. and samples so that representations of very large images may be displayed.
  1232. The ZOOM keyword can be used to enlarge a portion of an image on the
  1233. display screen.  Keywords can be specified to begin displaying at any line
  1234. and sample in the image with the SL (starting line) and SS (starting
  1235. sample).  If only a limited number of lines and samples are to be displayed
  1236. the NL (number of lines) and NS (number of samples) keywords can be used.
  1237. The UP, DOWN, LEFT and RIGHT keywords can be used to display different
  1238. portions of the image, relative to the currently displayed portion.  The
  1239. display can also placed at any point on the screen using the DSL (display
  1240. starting line) and DSS (display starting sample) keywords.  The FLIP
  1241. keyword displays the image from the bottom of the screen to the top, rather
  1242. than the other way around.
  1243.  
  1244.    DISPLAY takes the following keywords :
  1245.  
  1246.    buffer       displays the image in the named memory buffer
  1247.  
  1248.    SUBsample n  a positive integral subsampling factor for displaying
  1249.                 images larger than the size of the screen.  SUB=2 would
  1250.                 display an image at half the resolution.
  1251.  
  1252.    If the image lines and samples look like this:
  1253.  
  1254.                  sample values
  1255.  
  1256.         line 1      1 2 3 4 5
  1257.         line 2      6 7 8 9 10
  1258.         line 3      11 12 13 14 15
  1259.  
  1260.    Then the command DISP SUB 2 would produce:
  1261.  
  1262.                  sample values
  1263.  
  1264.         line 1      1 3 5
  1265.         line 2      11 13 15
  1266.  
  1267.    ZOOM n       a positive integral zoom factor for looking at part of an
  1268.                 image close up.  The zoom command replicates pixels by the
  1269.                 integer value specified.  If the image lines and samples
  1270.                 look like this:
  1271.  
  1272.                  sample values
  1273.  
  1274.         line 1      1 2 3
  1275.         line 2      4 5 6
  1276.         line 3      7 8 9
  1277.  
  1278.    Then the command ZOOM 2 would produce the following:
  1279.  
  1280.                  sample values
  1281.  
  1282.         line 1      1 1 2 2 3 3
  1283.         line 2      1 1 2 2 3 3
  1284.         line 3      4 4 5 5 6 6
  1285.         line 4      4 4 5 5 6 6
  1286.         line 5      7 7 8 8 9 9
  1287.         line 6      7 7 8 8 9 9
  1288.  
  1289.  
  1290.    CENTER       center the display around current cursor position.   This
  1291.                 command is very useful when displaying large images or when
  1292.                 zooming in on selected areas.  Should be used after using
  1293.                 the CURSOR command.
  1294.  
  1295.    NL n
  1296.    NS n         number of lines or samples from the image file to display
  1297.  
  1298.    SL n
  1299.    SS n         starting line or sample within the image file to display
  1300.  
  1301.    UP n
  1302.    DOWN n       adjusts the starting line up or down from the previous
  1303.                 value, thereby moving  the display window up or down in the
  1304.                 image. The default amount to move up or down is the size of
  1305.                 the display.
  1306.  
  1307.    LEFT n
  1308.    RIGHT n      adjusts the starting sample left or right from the previous
  1309.                 value, thereby moving the display window left or right in
  1310.                 the image
  1311.  
  1312.    DSL n
  1313.    DSS n        start the image display at the specified line and sample on
  1314.                 the display screen.
  1315.  
  1316.    FLIP         flips the image top to bottom, so the image is displayed
  1317.                 from the bottom of the screen to the top.
  1318.  
  1319.    NOPrompt     displays the image without display the command line prompt
  1320.                 (COMMAND:) at the bottom of the screen.  This is to
  1321.                 accommodate screen captures of IMDISP displays.
  1322.  
  1323.    AUToset n    sets DNLO and DNHI to n% of the full range, based on the
  1324.                 histogram.  The default is 5%.
  1325.  
  1326.    NOMemory     tells IMDISP not to attempt to load the image into extended
  1327.                 memory as it displays the image.
  1328.  
  1329.    SOUrce       used to display the source file of a browse image.  The
  1330.                 source file is specified with the SOURCE_FILE_NAME and
  1331.                 SAMPLING_FACTOR keywords in the label.  The source file is
  1332.                 centered on the current cursor position in the browse file.
  1333.                 Does not work with Voyager or Viking compressed images.
  1334.  
  1335.    Examples: The user wants to display an entire Voyager image (800 x 800)
  1336. on the display screen then display a portion of the image at full
  1337. resolution.  Type "FILE MIRANDA1.LBL", then "DISP SUB 2" to display the
  1338. entire image at half resolution, Use the CURSOR command to move the cursor
  1339. to the center of an area of interest.  Exit the cursor mode by typing ".",
  1340. then type "DISP CENT" to display the selected portion of the image at full
  1341. resolution.
  1342.  
  1343.    The user wishes to place 2 images which are each 800 lines by 800
  1344. samples on the screen next to each other.  The first file is opened with
  1345. "FILE IMAGE1.IMG".  The "DISPLAY SUB 4" command is given to display every
  1346. 4th line and sample of the image to create a 200 x 200 display. Next the
  1347. "FILE IMAGE2.IMG" command is given.  Now a "DISPLAY SUB 4 DSS 201" is given
  1348. to place the second image on the screen starting at display sample position
  1349. 201, next to the first image.
  1350.  
  1351.  
  1352.     Examples:
  1353.  
  1354.     DISP SUB 2
  1355.     DISP SUB 3 DSS 200
  1356.     DISP SUB 4 DSL 300
  1357.     DISP CEN ZOOM 2              (Use CUR first to select a center)
  1358.     DISP A                   Displays buffer A
  1359.     DISP A SUB 2             Displays buffer A, subsampled twice
  1360.     DISP A CEN ZOOM 3        Zooms in on the center of buffer A
  1361.  
  1362.  
  1363. 4.5.10 ENHANCE
  1364.  
  1365.  
  1366.    The command ENHANCE applies a number of image processing filters to the
  1367. image.  It can either be applied to the entire image (from the input file)
  1368. or simply to the displayed portion of the image.
  1369.  
  1370.    ENHANCE takes the following subcommands:
  1371.  
  1372.      SCReen         applies the filter to the entire screen.  If this
  1373.                     option is not selected, then the filter will be applied
  1374.                     to the image last displayed with the DISPLAY command.
  1375.  
  1376.      BAAlke         applies an enhancement filter developed by Ron Baalke.
  1377.  
  1378.      CONvolution n  applies a convolution filter to the image which has the
  1379.                     effect of detecting the edges.  A 3x3 mask is used.
  1380.                     There are two variations of this filter used (n = 0 or
  1381.                     1). Integer arithmetic is used to speed up the process.
  1382.                     The following weighted mask is used:
  1383.  
  1384.                                -1  -1  -1
  1385.                                -1   8  -1
  1386.                                -1  -1  -1
  1387.  
  1388.      EDGe n         applies an edge enhancement filter to the image using a
  1389.                     3x3 mask.  There are four variations of this filter (n
  1390.                     = 0, 1, 2, 3). Integer arithmetic is used to speed up
  1391.                     the process.
  1392.  
  1393.      LOG  n         applies a logarithmic filter to the image which has the
  1394.                     effect of enhancing the contrast in the image. Useful
  1395.                     on dark images or on images like stars and galaxies.
  1396.                     The parameter that goes with this one is a little
  1397.                     different than the other filters, in that you specify a
  1398.                     factor (default=40) which is multiplied with the log of
  1399.                     the pixel value. Examples:
  1400.  
  1401.      MEAn n         applies a mean filter to the image which has the effect
  1402.                     of smoothing out the image.  There are three variations
  1403.                     of this filter (n = 0, 1).  A 3x3 (n=0), 5x5 (n=1) or
  1404.                     7x7 (n=2) mask is used where the middle pixel is
  1405.                     replaced by the average of the nine pixels in the mask.
  1406.                     Integer arithmetic is used to speed up the process.
  1407.  
  1408.      MEDian         applies a median filter to the image which has the
  1409.                     effect of smoothing out the image.  A 3x3 mask is used
  1410.                     where the middle pixel is replaced by the middle of the
  1411.                     nine pixels after they have been sorted. The sort used
  1412.                     is a simple bubble sort which is terminated halfway
  1413.                     through the sort process since the median value will be
  1414.                     found by then.
  1415.  
  1416.      POWer n        modifies the pixels of the image by the following
  1417.                     equation:
  1418.  
  1419.                        newDN = numDN * (oldDN/numDN) ^ n
  1420.  
  1421.                     where n is a floating point number.  The default value
  1422.                     is 2.0.  Values less than 1.0 tend to brighten the
  1423.                     image, while values greater than 1.0 tend to darken it.
  1424.  
  1425.      STAir n        groups pixels together with the net result of smoothing
  1426.                     the image.  The default step increment is 8
  1427.  
  1428.      SMEar          applies a filter which averages the image in the
  1429.                     vertical direction.  The result is to "smear" the
  1430.                     images down the screen.
  1431.  
  1432.      UNSharp        applies an unsharp mask to the image, which has the
  1433.                     effect of enhancing edges in the image. It is the
  1434.                     equivalent of performing a merge with 3 times the
  1435.                     original image minus 2 times the image after it has
  1436.                     been blurred with a 5x5 mean filter.
  1437.  
  1438.  
  1439.      Examples:
  1440.  
  1441.         ENH MEAN
  1442.         ENH EDGE
  1443.         ENHANCE EDGE 2
  1444.         ENHANCE BAALKE SCREEN
  1445.         ENH CON 1
  1446.         ENH SMEAR SCR
  1447.         ENH POWER .1   (similar to ENH LOG)
  1448.         ENH STAIR 2    (creates a binary 2-color image)
  1449.  
  1450.  
  1451. 4.5.11 ERASE
  1452.  
  1453.  
  1454.    The command ERASE causes the screen to be erased by setting all of the
  1455. pixels to 0, which may not necessarily be black depending on the palette
  1456. setting.  If the REFRESH option is selected, then only the refresh buffer
  1457. will be erased.  Memory buffers (denoted by letters A through Z) can also
  1458. be erased.
  1459.  
  1460.     Examples:
  1461.  
  1462.        ERA            erases the screen
  1463.        ERA REFRESH    erases the refresh buffer
  1464.        ERA A          erases the memory buffer named A
  1465.  
  1466.  
  1467. 4.5.12 EXIT
  1468.  
  1469.  
  1470.    The EXIT command exits IMDISP and returns the user to the MS-DOS
  1471. operating system.  The contents of the image display and refresh buffer are
  1472. discarded.   The single subcommand NOClear will leave the computer display
  1473. in graphics mode, and will not clear the screen.  Same as QUIT.
  1474.  
  1475.  
  1476. 4.5.13 FILE
  1477.  
  1478.  
  1479.    FILE takes just a value which is the file name. The specified file will
  1480. be opened, or an error message issued if the file cannot be opened.  The
  1481. capability to directly address any sector on the CD-ROM disk by providing
  1482. its physical address (minute, second and sector number) is also available
  1483. to users of the Microsoft Extensions software.  There is one keyword,
  1484. NOMEMORY.  If not given, the FILE command will attempt to put the image
  1485. directly into extended memory (where the DISPLAY command will find it).  If
  1486. specified, or if the image doesn't fit into extended memory, the DISPLAY
  1487. command will read the image from disk.  FILE can now display GIF-format
  1488. images, as well.  It does this automatically if the filename extension is
  1489. .GIF.
  1490.  
  1491.    If the FILE command is specified without a filename, or with a filename
  1492. mask which contains a wildcard, the program will display a list of file
  1493. names in the current directory.  Each file name is preceded by a number.
  1494. Typing the number associated with a file name will select that file for
  1495. processing.  File names that actually represent lower level directories are
  1496. indicated with a <d> symbol after the name, Directories can be traversed
  1497. downward by selecting the number associated with a directory name.  Upward
  1498. traversal is by selecting the item identified as PARENT DIR.  This will
  1499. move upward in the directory hierarchy.
  1500.  
  1501.    The prompt mode clears the screen and displays a menu of files (matching
  1502. the wildcard mask, if one was used) and commands.  These commands allows
  1503. specification of the default drive, a file "mask" to use in selecting file
  1504. names for display and options for moving through the list of files when the
  1505. current directory contain more than 30 files. The top line of the display
  1506. also indicates how many files are in the current directory.  After exiting
  1507. the FILE prompt mode, the previous contents of the display screen can be
  1508. recovered by typing "REFRESH".
  1509.  
  1510.    The FILE prompt mode subcommands:
  1511.  
  1512.      D    select default disk drive
  1513.      M    specify a file selection mask to use in displaying files on the
  1514.           screen.
  1515.      N    display the next set of file names on the screen if there are
  1516.           more files in the current directory than can be displayed on one
  1517.           screen.
  1518.      P    display the previous set of file names.
  1519.      Q    quit the file selection mode and return to IMDISP command mode.
  1520.  
  1521.    The N, P and Q commands are executed immediately.  If the D or M
  1522. commands are selected, the user is prompted to enter a drive letter or file
  1523. mask.
  1524.  
  1525.    If the file selected by the "FILE filename" or FILE prompt mode has a
  1526. valid label, either PDS or VICAR2, then the number of lines and samples and
  1527. the pixel size will be displayed.  If the file is unlabeled then the
  1528. program will prompt for the values to use for the number of lines and
  1529. samples, the number of bits per pixel, and the number of header bytes. PDS
  1530. detached labeled images can also be displayed.  The specified file remains
  1531. the current file until a new FILE command is given.  The FILE command
  1532. resets the SET DNLO and SET DNHI values to the minimum and maximum for the
  1533. pixel size (normally 0 and 255).  If a specified filename is not found in
  1534. the current directory then an error message is displayed.
  1535.  
  1536.    If the unlabeled image has a regular format, that is a uniform structure
  1537. of repeating lines and samples, the user can specify this information when
  1538. prompted by the program.  For example, an image named ASTERIA.DAT with one
  1539. 1422 byte header block followed by an image composed of 370 lines by 450
  1540. samples of 8 bit pixels would be processed as follows:
  1541.  
  1542.    At the COMMAND: prompt type "FILE ASTERIA.DAT".  The program will
  1543. display the message:
  1544.  
  1545.   Input file does not have a proper label.
  1546.   Input number of lines: 370           enter the value 370
  1547.   Input number of samples: 450         enter the value 450
  1548.   Input size of each sample: 8         enter the value 8
  1549.   Input size of header label: 1422     enter 1422 for the size of the
  1550.                                        foreign label block).
  1551.  
  1552.    The physical address of a data block on the CD-ROM can also be specified
  1553. using the syntax 'FILE "CD:mm:ss:bb"', where mm is the minute, ss the
  1554. second, and bb the sector block number of the beginning of the desired data
  1555. area.  The CD:mm:ss:nn must be in double quotes and the CD must be
  1556. capitalized! This mechanism can be used to access files on non-High Sierra
  1557. format disks.  This will only work on systems using the Microsoft
  1558. Extensions software.
  1559.  
  1560.  
  1561. 4.5.14 HELP
  1562.  
  1563.  
  1564.    HELP displays the online help message.  If followed by the name of a
  1565. valid command the message for that command is displayed.  HELP is not
  1566. provided for MS-DOS commands (DIR, CHDIR, CD and TYPE).
  1567.  
  1568.  
  1569. 4.5.15 HISTOGRAM
  1570.  
  1571.  
  1572.    The HISTOGRAM command produces a plot showing the number of pixel values
  1573. in the image at each DN level.  The range of DN values is displayed on the
  1574. x-axis and the number of occurrences of a specific DN value on the y-axis
  1575. (See Figure 4-1).
  1576.  
  1577.    The HISTOGRAM command reads through the image, calculates the histogram,
  1578. and then displays the plot on the screen.  The histogram is scaled so that
  1579. the third highest histogram value is used as the maximum. It is recommended
  1580. that the SUBSAMPLE or other subsetting keywords be used to speed up
  1581. histogram calculation, which can be quite slow for large images and for
  1582. images stored on CD-ROM.  Histogram plots are displayed on top of any image
  1583. currently displayed on the screen, so the user may wish to use the ERASE
  1584. command to clear the screen prior to using HISTO.  After the histogram is
  1585. displayed, the image can be restored using the REFRESH command.
  1586.  
  1587.  
  1588.             27582 |      .
  1589.                   |      ..
  1590.                   |     ....
  1591.            COUNT  |     .....
  1592.                   |    .......
  1593.                   |    .........
  1594.                   |   ............
  1595.                   |  ...............
  1596.                    --+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1597.                    0   64   128   192   256
  1598.                             DN value
  1599.  
  1600.                    Figure 4-1: Sample Image Histogram
  1601.  
  1602.  
  1603.    By evaluating the histogram, the user can determine the optimum settings
  1604. for the SET (DNLO and DNHI) command to produce a useful display.  In the
  1605. example above, the image data are clustered between DN values 32 and 144.
  1606. Using the default settings of the EGA display mode the colors assigned to
  1607. the 2 lowest color values and the 7 highest values (representing DN values
  1608. from 0 to 31 and from 144 to 255) would not be used since the image
  1609. contains no pixels with these values.
  1610.  
  1611.    By using the "SET DNLO 32 DNHI 144" command the 16 display levels
  1612. available on the EGA display would be assigned to values between 32 and 144
  1613. rather than distributed evenly from 0 to 255, and all 16 colors would be
  1614. used in the display.
  1615.  
  1616.    HISTOGRAM takes the following keywords and arguments:
  1617.  
  1618.     SUBsample n  a integral subsample factor.  For speeding up HISTOGRAM,
  1619.                  use of "SUBSAMPLE 4" is recommended
  1620.  
  1621.     buffer       displays the histogram of the image in the named memory
  1622.                  buffer
  1623.  
  1624.     NL n
  1625.     NS n         number of lines and samples from image
  1626.  
  1627.     SL n
  1628.     SS n         starting line and sample in image
  1629.  
  1630.     CENT         perform the histogram on only the displayed portion of the
  1631.                  image.
  1632.  
  1633.    Two special keywords can be used with Voyager or Viking images on the
  1634. PDS CD-ROM disks.  These will extract histogram values stored with the
  1635. image on the CD-ROM disk and reduce the time required for the histogram to
  1636. be generated from more than 1 minute to about 3 seconds.  Note that these
  1637. commands will not work with Voyager image files in the
  1638. \PLANET\JUPITER\ATMOS directory, or with versions of system software
  1639. written before April 1987.
  1640.  
  1641.     VOY   use histogram from Voyager CD-ROM engineering data
  1642.     VIK   use histogram from Viking CD-ROM engineering data
  1643.  
  1644.  
  1645. 4.5.16 LABEL
  1646.  
  1647.  
  1648.    The LABEL command prints the labels for the currently selected image
  1649. file on the screen.   It pauses after each screen full of data, and waits
  1650. for you to press a key before displaying the next screen of data. You can
  1651. terminate the listing by pressing the letter 'Q' to quit and return to
  1652. IMDISP.
  1653.  
  1654.  
  1655. 4.5.17 LOG
  1656.  
  1657.  
  1658.    The LOG command controls logging commands to a text file as they're
  1659. entered.  The resulting file can be used as a batch file, to repeat the
  1660. command sequence, or as a record of what operations have been performed.
  1661. The file is automatically flushed and closed when you exit IMDISP.
  1662.  
  1663.    The LOG command takes the following keywords and arguments:
  1664.  
  1665.     ON             opens a log file called IMDISP.LOG.  Commands will be
  1666.                    copied into this file until it is either closed or you
  1667.                    exit IMDISP.
  1668.  
  1669.     FILe  fname    opens a log file called fname (defaults to IMDISP.LOG).
  1670.  
  1671.     CLOse
  1672.     OFF            closes the current log file.
  1673.  
  1674. 4.5.18 MASK
  1675.  
  1676.    The MASK command is used to mask out pixels on the low or high end of
  1677. the color palette.  It is particularly userful when merging images
  1678. together.  It sets all the pixels with a DN value above or below a
  1679. specified value to a default.
  1680.  
  1681.    The MASK command takes the following keywords and arguments:
  1682.  
  1683.     LO n           sets all pixels with a DN value of n or less to the
  1684.                    default DN value of 0.
  1685.  
  1686.     HI n           sets all pixels with a DN value of n or greater to the
  1687.                    default DN value of 255.
  1688.  
  1689.     WITH n         overrides the default values for LO and HI, and sets the
  1690.                    pixels to the DN value n.
  1691.  
  1692. Examples:
  1693.  
  1694. MASK LO 20             Sets the DN values for all pixels with DN values of
  1695.                        20 or less to 0.
  1696.  
  1697. MASK LO 20 WITH 255    Sets the DN values for all pixels with DN values of
  1698.                        20 or less to 255.
  1699.  
  1700. MASK HI 200            Sets the DN values for all pixels with DN values of
  1701.                        200 or more to 255.
  1702.  
  1703. MASK HI 200 WITH 0     Sets the DN values for all pixels with DN values of
  1704.                        200 or more to 0.
  1705.  
  1706.  
  1707. 4.5.19 MENU
  1708.  
  1709.  
  1710.    The MENU command reads a file containing a list of file names and places
  1711. the user in the MENU mode, where files from this list can be selected for
  1712. display.  The MENU mode is similar to the FILE mode, except that the list
  1713. of files presented is that provided in the menu file, rather than from a
  1714. selected directory.
  1715.  
  1716.    The MENU mode can be invoked by typing "MENU filename.MNU" at the
  1717. COMMAND: prompt.  It can also be invoked on program startup by typing
  1718. "IMDISP filename.MNU" to initiate the program.  The menu file must use the
  1719. ".MNU" extension to startup IMDISP in MENU mode.
  1720.  
  1721.    Subcommands of the MENU mode are as follows:
  1722.  
  1723.    #         - Enter the number corresponding to a desired
  1724.                file name to select the file.
  1725.  
  1726.    P)revious - display the previous screen of file names
  1727.    N)ext     - display the next screen of file names
  1728.    Q)uit     - quit or exit from MENU mode
  1729.  
  1730.    After selecting and displaying an image, the user can return to the
  1731. current menu by typing "MENU" at the COMMAND: prompt.
  1732.  
  1733.    A menu file can take either of two formats.   The preferred format is a
  1734. PDS labelled table file containing file names.  A sample file is shown
  1735. below:
  1736.  
  1737. NJPL1I00PDS100000000      = SFDU_LABEL
  1738. FILE_TYPE                 = TABLE
  1739. RECORD_FORMAT             = STREAM
  1740. OBJECT                    = FILE_NAME
  1741.  TYPE                     = LITERAL
  1742.  LENGTH                   = 80
  1743. ENDOBJECT
  1744. NOTE                      = "Sample MENU file for IMDISP"
  1745. END
  1746. L:\OCEAN\SCBMEAN.IMG
  1747. L:\OCEAN\WCMEAN.IMG
  1748. L:\PLDS\TMCH01.DAT
  1749. L:\PLDS\DEM.DAT
  1750. L:\PLANET\SATURN\ATMOS\C3497355.IMG
  1751. <END OF FILE>
  1752.  
  1753.    A second abbreviated form may also be used, where only the filenames are
  1754. specified in the ".MNU" file.  In this case the file would only contain the
  1755. filenames shown after the END statement in the example above.
  1756.  
  1757.  
  1758. 4.5.20 MERGE
  1759.  
  1760.  
  1761. The MERGE command will merge buffers, images or the screen together.  A
  1762. scaling option can be provided to control the amount of merging.  If the
  1763. TO option is not used then the result will be displayed on the screen by
  1764. default.  The result can also be written to a buffer.
  1765.  
  1766.         MERGE buffer
  1767.         MERGE source1 [scale1] WITH source2 [scale2] [TO buffer] [FILE]
  1768.  
  1769. Examples:
  1770.  
  1771. MERGE A                   Merge the last displayed image with buffer A and
  1772.                           display the result back on the screen
  1773.  
  1774. MERGE A WITH B            Merge buffer A with buffer B and display the result
  1775.                           on the screen.  Since no scaling parameter are
  1776.                           specified IMDISP will default to 50% of A and 50% of
  1777.                           B.
  1778.  
  1779. MERGE A WITH B TO C       Merge buffer A with buffer B and store the result
  1780.                           into buffer C
  1781.  
  1782. MERGE A WITH B -1         Subtract buffer A from buffer B
  1783.  
  1784. MERGE A .75               Merge 25% of the last displayed image with 75% of
  1785.                           buffer A, display the result on the screen.
  1786.  
  1787. MERGE A .75 with B .8     Merge 75% of buffer B with 80% of buffer B, display
  1788.                           result on the screen
  1789.  
  1790. MERGE B WITH SCREEN       Merge buffer B with the screen
  1791.  
  1792. MERGE A 3 WITH B -2 TO C FILE    Subtract 200% of buffer B from 300% of A,
  1793.                                  store the result in buffer.
  1794.  
  1795.  
  1796. 4.5.21 OVERLAY
  1797.  
  1798.  
  1799.    The OVERLAY command draws a lat/lon overlay grid on the displayed image.
  1800. It is intended only for use with the Ocean Data System, West Coast Time
  1801. Series CD-ROM in this program version.
  1802.  
  1803.    The OVERLAY command has the following arguments:
  1804.  
  1805.    MAXLAT   Latitude of top of image.
  1806.    MINLAT   Latitude of bottom of image.
  1807.    MAXLON   Longitude of left side of image.
  1808.    MINLON   Longitude of right side of image.
  1809.  
  1810.    LEGend   Draw a color scale with the overlay.
  1811.  
  1812.  
  1813. 4.5.22 PALETTE
  1814.  
  1815.  
  1816.    The PALETTE command is used for changing the colors assigned to
  1817. displayable color values.  This is done by modifying an internal color
  1818. table which assigns intensity values for red, green and blue to a color
  1819. value, The EGA provides 4 intensity values for each of 3 colors, so that 64
  1820. different colors can be created.  However, the EGA pixels are only 4-bits
  1821. each so only 16 color values can be used simultaneously.
  1822.  
  1823.    The palette can be modified using the EDIT command and saved and loaded
  1824. from a disk file.  The edit mode is invoked by typing PALETTE EDIT.  With
  1825. the EGA display, a bar containing 16 colors or shades will be displayed on
  1826. the bottom of the screen.  A small square will appear in the middle of the
  1827. center color box.  This indicates that this color value is currently
  1828. selected for editing.  To select another color value for editing, move the
  1829. small square to the appropriate color using either the "4" (left arrow) and
  1830. "6" (right arrow) keys on the numeric keypad or the mouse.  The "7" (Home)
  1831. and "1" (End) keys move to the beginning and end of the palette. Pressing
  1832. the "Ctrl" key with either the "4" or "6" keys will jump the small square
  1833. left or right by 8 color bars.
  1834.  
  1835.    The color of the current color box is changed with the "R", "G", and "B"
  1836. keys (for red, green, and blue).  Upper case letters increase the amount of
  1837. the primary color, and lower case keys decrease the amount of the color.
  1838. The "8" (up arrow) and "2" (down arrow) keys increase and decrease,
  1839. respectively, the amount of red, green, and blue simultaneously.  The left
  1840. button on the mouse does the same thing.  Other commands in the palette
  1841. edit mode are the "S" and "s" commands, which will shift all colors one
  1842. value to the right or left, and the "x" command, which will exchange color
  1843. values (the color setting for color 0 becomes the setting for color 15,
  1844. while 15 replaces 0, the color setting for color 1 becomes the setting for
  1845. 14, while 14 replaces 1, etc.).  The up and down arrow keys can also be
  1846. used to cycle through the colors available in a given display mode one at a
  1847. time. Type the "." key or carriage return to exit the edit mode.
  1848.  
  1849.    PALETTE takes the following keywords and arguments:
  1850.  
  1851.     EDIT n         to interactively adjust an n-color palette.  See edit
  1852.                    description (above) for details
  1853.  
  1854.     PSEUDOCOLOR n  PS = 0 for default EGA palette,
  1855.                    PS = 1 for gray scale palette,
  1856.                    PS = 2 or 3 for pseudo color palettes (16 levels)
  1857.                    PS = 4, ..., 9 for pseudo color palettes (256 levels)
  1858.  
  1859.     SAVE filename  saves the specified palette on disk
  1860.     LOAD filename  loads the specified palette from disk, if no filename is
  1861.                    specified, then list of files is displayed.  See FIL
  1862.                    command for more details.
  1863.     DIS            displays the current palette on the screen
  1864.     ERA            erases the current palette from the screen
  1865.     CYC  n         cycles the color palette
  1866.  
  1867.                    CYC = 0  "blinks" the palette
  1868.                    CYC = 1  blinks four times
  1869.                    CYC = 2  rotates the palette for spectacular results
  1870.                    CYC = 3  rotates and feeds in random colors
  1871.                    CYC = 4  randomizes the palette
  1872.                    CYC = 5  double rotates the palette
  1873.                    CYC = 6  random swaps of the palette
  1874.  
  1875.                    Any key will stop the palette cycling.  A 'S' or 's' key
  1876.                    will save the palette which is currently being
  1877.                    displayed, any other key will restore the palette to its
  1878.                    original colors.
  1879.  
  1880.                    CYCLE itself has two keywords.
  1881.  
  1882.                    FASt     sets the delay between changes to .1 second
  1883.                             (the default is .3).  Works best on machines
  1884.                             with fast video, where flicker is minimized.
  1885.  
  1886.                    TIMe n   runs the PAL CYCLE command for n seconds
  1887.                             (useful in batch files).
  1888.  
  1889.  
  1890.    The default palette file for LOAD or SAVE operations is IMDISP.PAL. The
  1891. format of the default color palette when stored in a palette file is as
  1892. shown below:
  1893.  
  1894. NJPL1I00PDS000000784     = PDS_SFDU_LABEL
  1895. FILE_TYPE                = TABLE
  1896. RECORD_TYPE              = STREAM
  1897. FILE_RECORDS             = 28
  1898. TABLE_ROWS               = 16
  1899. ROW_COLUMNS              =  4
  1900. COLUMN_NAME              = (COLOR_NUMBER,                                          RED_VALUE,
  1901.                             GREEN_VALUE,
  1902.                             BLUE_VALUE)
  1903. COLUMN_TYPE              = (INTEGER,INTEGER,INTEGER,INTEGER)
  1904. END
  1905.   0   0   0   0
  1906.   1  64   0   0
  1907.   2 128   0   0
  1908.   3 192   0   0
  1909.   4 192  64   0
  1910.   5 192 128   0
  1911.   6 192 192   0
  1912.   7 128 192   0
  1913.   8   0 192   0
  1914.   9   0 192 128
  1915.  10   0 128 128
  1916.  11   0 128 192
  1917.  12   0   0 192
  1918.  13 128   0 192
  1919.  14 192   0 192
  1920.  15 192 192 192
  1921.  
  1922.    The first column of the palette table is the color value number for the
  1923. display, and columns 2, 3 and 4 represent the intensity of the red, green
  1924. and blue (respectively) primary colors on a scale of 0 to 255. With the EGA
  1925. display these values are: 0 = off; 64 = low; 128 = medium; 192 = high.
  1926.  
  1927.  
  1928.    Examples:
  1929.  
  1930.       PAL PS 1          (Gray scale palette)
  1931.       PAL PS 7          (Built in color palette #7)
  1932.       PAL DIS
  1933.       PAL EDI
  1934.       PAL CYC 2
  1935.       PAL CYC 4
  1936.  
  1937.  
  1938. 4.5.23 PERSPECTIVE
  1939.  
  1940.    PERSPECTIVE displays the current image as a pseudo-perspective plot.
  1941. This is useful for inspecting the topography of an image - brighter areas
  1942. will seem to be raised higher than dark areas.
  1943.  
  1944.    The PERSPECTIVE command has these arguments:
  1945.  
  1946.    SL  n   displays the plot starting at line n of the image
  1947.  
  1948.    SCR     reads the image from the screen, rather than from disk (slightly
  1949.            faster).
  1950.  
  1951.  
  1952. 4.5.24 PROFILE
  1953.  
  1954.  
  1955.    PROFILE plots the DN values of pixels located along a line between two
  1956. points in the image, i.e., it creates a graph of DN value versus pixel
  1957. along the line joining the two points, CURsor mode is used to select the
  1958. two endpoints; typing "." or carriage return, or tapping the left mouse
  1959. button, selects the current cursor position as the endpoint.  After the
  1960. endpoints are selected a line is drawn between the points and the graph is
  1961. plotted at the bottom of the screen, showing the DN values on the x-axis
  1962. and the positions along the line on the y-axis.
  1963.  
  1964.  
  1965. 4.5.25 QUIT
  1966.  
  1967.  
  1968.    The QUIT command exits IMDISP and returns the user to the MS-DOS
  1969. operating system.  The contents of the image display and refresh buffer are
  1970. discarded.   The single subcommand NOClear will leave the computer display
  1971. in graphics mode, and will not clear the screen.
  1972.  
  1973.  
  1974. 4.5.26 REFRESH
  1975.  
  1976.  
  1977.    REFRESH redisplays the image plane from the refresh buffer.  When images
  1978. are written to the screen they are also written to the refresh buffer.  The
  1979. REFRESH command writes this buffer back to the screen, thereby erasing any
  1980. graphics or text overlaying the image on the screen. The refresh buffer
  1981. contains as many lines from the display screen as there is room for in
  1982. memory.  REFRESH takes no parameters.  It can also be used after the FILE
  1983. prompt mode to redisplay the contents of the refresh buffer.  By default,
  1984. the refresh buffer is allocated from extended (XMS) memory.  If extended
  1985. memory is present, the refresh buffer is on by default.  If there isn't any
  1986. extended memory, or not enough extended memory is available, the refresh
  1987. buffer is off by default, by may be turned on to use a virtual file.  The
  1988. location of the virtual file is given by the environment variable
  1989. IMREFRESH.
  1990.  
  1991.    REFRESH is commonly used after the HELP command, or after a HISTOGRAM or
  1992. PROFILE command to remove text and plots from the display screen.
  1993.  
  1994.    The refresh buffer can be disabled/enabled with the SET command:
  1995.  
  1996.       SET REFRESH ON
  1997.       SET REFRESH OFF
  1998.  
  1999.  
  2000. 4.5.27 SAVE
  2001.  
  2002.  
  2003.    The SAVE command copies the contents of the display screen to a file. On
  2004. EGA systems the display buffer contains only 4-bits per pixel, so
  2005. specifying BP = 8 will write the 4-bit pixels in full bytes, but does not
  2006. save full 8-bit pixels even if the input image is an 8-bit image. Use the
  2007. COPIM utility program to produce a full resolution subset of an 8-bit image
  2008. in that case.  An 8-bit display device can save an image with full 8-bit
  2009. pixels.
  2010.  
  2011.    SAVE takes the following arguments and keywords, where the filename must
  2012. immediately follow the SAVE command:
  2013.  
  2014.     filename    filename of image to save - if the extension on the
  2015.                 filename is .GIF, the file will be saved in GIF format
  2016.                 instead of PDS format.
  2017.  
  2018.     NL n
  2019.     NS n        number of lines and samples to save
  2020.  
  2021.     SL n
  2022.     SS n        starting line and sample to save
  2023.     BP n        number of bits per pixel in output image
  2024.     REFRESH     save the displayed image into the refresh buffer
  2025.  
  2026.    Example: Save a 200 line by 200 sample area at the center of an image in
  2027. the file SMALL.IMG.  First use the FILE command to select and display an
  2028. input image.  Now type:
  2029.  
  2030.    "SAVE SMALL.IMG SL 100 SS 210 NL 200 NS 200"
  2031.  
  2032. to save the portion of the image beginning at line 100 and sample 210 in
  2033. the new file SMALL.IMG.
  2034.  
  2035.  
  2036. 4.5.28 SET
  2037.  
  2038.  
  2039.    SET is used set various display options.  It may be used to display and
  2040. change the DN (pixel value) range that is used to compress the pixel values
  2041. to the range appropriate for the display device.  The default, which is
  2042. reset for each new file, is the full range of DN values for the particular
  2043. pixel format (e.g.  0 to 255 for byte).
  2044.  
  2045.    The results of a SET DNLOW or SET DNHIGH command will not take effect
  2046. until the next DISPLAY command is performed.
  2047.  
  2048.    SET can also be used to specify a file name to be used by the browse
  2049. command, change the default display resolution or change the number of
  2050. samples used to display the current image.
  2051.  
  2052.    Set takes the following keywords:
  2053.  
  2054.     DNLOW n
  2055.     DNHIGH n  where values less than DNlow are set to color value 0, values
  2056.               greater than DNHIGH are set to the maximum color value
  2057.               available, and the color values between are assigned equally
  2058.               to the DN values between Dnlow and DNhi.
  2059.  
  2060.     BROwse filename
  2061.               sets a file name to be used for the browse file.   This file
  2062.               name will override  the default file name, which is
  2063.               'c:browse.cmd'.
  2064.  
  2065.     NS n      sets the number of samples to be used for the next DISPLAY
  2066.               command.
  2067.  
  2068.     REFresh ON
  2069.     REFresh OFF
  2070.               toggles the state of the refresh buffer on or off.  If IMDISP
  2071.               detects the presence of extended memory (XMS - managed by a
  2072.               device driver like HIMEM.SYS or QEMM), the refresh buffer
  2073.               will default to ON.  If no XMS is present, the default is
  2074.               off, and turning the refresh buffer on will cause IMDISP to
  2075.               set up a scratch file to be used as the refresh buffer.
  2076.  
  2077.     DELay ON
  2078.     DELay OFF (default)
  2079.               enables/disables the time delay before executing commands.
  2080.               Most useful when used in batch file, because it allows the
  2081.               commands to play slowly instead of as fast as possible.
  2082.  
  2083.     PROmpt ON  (default)
  2084.     PROmpt OFF
  2085.               enables/disables the display of the command names before
  2086.               execution.  Most useful when used in batch files, because it
  2087.               prevents the command prompts from appearing on the screen.
  2088.  
  2089.     DISPLAY name
  2090.               sets the current display device.   You might use this to
  2091.               change from Super VGA resolution to VGA if you wish to have
  2092.               bigger pixels for displaying images with the BROWSE command,
  2093.               for example.  To do this, you would type the command SET DIS
  2094.               VGA.  The change will take place immediately.   The current
  2095.               values for DISPLAY are
  2096.  
  2097.               CGA         (640x200x2)
  2098.               EGA         (640x350x16)
  2099.               EGA480      (640x480x16)
  2100.               VGA320      (320x200x256)
  2101.               VGA         (640x480x16)
  2102.               ATI640      (640x480x256) - ATI VGA Wonder Board (512K)
  2103.               ATI800      (800x600x256) - ATI VGA Wonder Board (512K)
  2104.               ATI1024     (1024x768x16) - ATI VGA Wonder Board (512K)
  2105.               EVGA512     (512x480x256) - Everex EV-673 Board (256K)
  2106.               EVGA640     (640x400x256) - Everex EV-673 Board (256K)
  2107.               ORCHID      (640x480x256) - Orchid ProDesigner+ Board (512K)
  2108.               ORCHID800   (800x600x256) - Orchid ProDesigner+ Board (512K)
  2109.               ORCHID1024 (1024x768x256) - Orchid ProDesigner+ Board (1MB)
  2110.               PARADISE    (640x480x256) - Paradise SuperVGA Board (512K)
  2111.                           (640x400x256) - Paradise SuperVGA Board (256K)
  2112.               PGA         (640x480x256) - PGA Board
  2113.               TRIDENT     (640x480x256) - Trident-based SVGA boards (512K)
  2114.               VESA       (1024x768x256) - VESA SVGA Interface (1MB) (test)
  2115.  
  2116.     PALette directory
  2117.               Sets the default palette directory.  This is used with the
  2118.               PAL LOAD command.  If PAL LOAD is used with no parameters,
  2119.               IMDISP will go to the default palette directory and display
  2120.               the files there.
  2121.  
  2122.     BUFfers directory
  2123.               Sets the directory to hold the buffers as files instead of
  2124.               memory buffers.  Useful when not enough extended (XMS) memory
  2125.               exists to create the buffers.
  2126.  
  2127.    For example, using the default color palette and an EGA display with 16
  2128. color values available, the command "SET DNLO 100 DNHI 164" will assign DN
  2129. values below 100 to black and DN values above 164 to white, and spread the
  2130. 16 color values between the DN limits, thus each color value will represent
  2131. 4 DNs (value 0 = DN 100 to 103; value 1 - DN 104 to 107, etc.).
  2132.  
  2133.    If values other than the default are used then the images will display
  2134. more slowly because scaling divisions are required.  SET with no parameters
  2135. will display the current values.
  2136.  
  2137.    The DNLO and DNHI values are reset to the minimum and maximum for a
  2138. given pixel size when a FILE command is issued.
  2139.  
  2140.  
  2141. 4.5.29 SLANT
  2142.  
  2143.  
  2144.    SLANT displays the image slanted either to the left or right.  This is
  2145. done by shifting each line of the image by 1 pixel.  It is particularly
  2146. useful for finding errors in image headers.
  2147.  
  2148.  
  2149.    Examples:
  2150.  
  2151.       SLANT                (slants image to the right)
  2152.       SLANT LEFT
  2153.  
  2154.  
  2155. 4.5.30 STRETCH
  2156.  
  2157.  
  2158.    STRETCH sets the palette to a gray scale stretched between the two
  2159. specified pixel values.  Stretch is most useful on the PGA display where 16
  2160. gray levels are available.  On the EGA display the stretch command
  2161. activates the gray level palette which provides only 4 gray levels.  Use
  2162. the PAL PS 0 command to return the display to the default palette after
  2163. performing a stretch.
  2164.  
  2165.    STRETCH takes the following keywords :
  2166.  
  2167.     LOW n
  2168.     HIGh n   the low and high DN values of the stretch.
  2169.  
  2170.  
  2171.    These pixel values refer to the DN values in the current image display,
  2172. not necessarily in the original image (scaling may have been involved). For
  2173. example with the EGA display the DN values in the display range from 0 to
  2174. 15, even if a byte image is being displayed.
  2175.  
  2176.    The STRETCH command is not recommended for use on EGA systems.
  2177.  
  2178.  
  2179. 4.5.31 SYSTEM
  2180.  
  2181.  
  2182.    The SYSTEM command is used to send a command to MS-DOS.
  2183.  
  2184.    For example "SYS L:" will set the L: drive as the current default drive.
  2185. If there is not enough memory available for the system command to be
  2186. executed an error message is displayed.  The SYS command will not work on
  2187. floppy disk systems unless the file "COMMAND.COM" is present on the floppy
  2188. disk with the IMDISP program.
  2189.  
  2190.    The SYSTEM command in this version of IMDISP will attempt to free as
  2191. much of memory as possible, by swapping most of the program to scratch
  2192. space.  It tries to find Extended memory (XMS), Expanded memory (EMS) or
  2193. disk space, in that order.  If it succeeds, only a small amount of IMDISP
  2194. remains in memory, leaving far more memory for DOS functions that previous
  2195. versions.  If the attempt to swap fails, the program will try to swap to
  2196. DOS with the available memory.  Currently, you must have about the same
  2197. amount of free XMS, EMS or disk space as you have memory free before
  2198. running IMDISP (i.e., IMDISP allocates all available memory to itself when
  2199. it starts, and requires that much scratch space when swapping out).
  2200.  
  2201.    The swap process, if it attempts to write out to a scratch disk file,
  2202. will use the directory specified by the environment variable IMBROWSE. If
  2203. IMBROWSE doesn't exist, IMDISP will write the scratch file to the root
  2204. directory of drive C:.  The scratch file is deleted when you return to
  2205. IMDISP (using the EXIT command at the DOS prompt).
  2206.  
  2207.  
  2208. 4.5.32 TEXT
  2209.  
  2210.  
  2211.    The text command can be used to display a string of text on the screen.
  2212. The text string can be entered on the command line, enclosed in
  2213. apostrophes or quotes (e.g., TEXT `This is a text string').  If the text
  2214. string is not entered on the command line the program will prompt for the
  2215. string to be displayed.
  2216.  
  2217.    Once the command is issued and the text string entered the program is
  2218. placed in CURSOR mode so that the display position can be selected. This is
  2219. done by using the arrow keys to move the cursor to the desired location.
  2220. After the position is selected, the user types a period (.) or carriage
  2221. return and the text will be written on the display screen.
  2222.  
  2223.    The TEXT command has one argument and two optional keywords.
  2224.  
  2225.    LINe      The line number to position the text at.
  2226.    SAMple    The sample number to position the text at.
  2227.    NOPrompt  Will display text without the command line prompt.
  2228.  
  2229.    'text...' The text string to be printed, enclosed in quotes or
  2230.              apostrophes.
  2231.  
  2232.    The text command writes over image data in the display and refresh
  2233. buffer, thus the underlying portion of the image is lost.
  2234.  
  2235.  
  2236. 4.5.33 TYPE
  2237.  
  2238.  
  2239.    The TYPE command is used to type the contents of a text file on the
  2240. display screen, using the standard MS-DOS type command.
  2241.  
  2242.    Its argument is passed to MS-DOS for execution.  At the end of the type
  2243. operation the screen will display "Type carriage return to continue:" which
  2244. will return to the IMDISP command mode.  If there is not enough memory
  2245. available for the system command to be executed an error message is
  2246. displayed.
  2247.  
  2248.  
  2249. 4.5.34 NEG
  2250.  
  2251.  
  2252.    The NEG command is used to invert the current color palette, turning the
  2253. image into a negative.   It takes no keywords or arguments.
  2254.  
  2255.  
  2256. 4.5.35 PLOT
  2257.  
  2258.    The PLOT command is used to draw plots of image lines and spectra on the
  2259. screen.  If the current file is an image, you must specify which line you
  2260. wish to plot.
  2261.  
  2262.    PLOT takes the following keywords:
  2263.  
  2264.     LIN n      plot line n of the image (required for 2-D files)
  2265.     SYMbol x   draw the plot using character x instead of connecting the
  2266.                points with a line
  2267.     ZOOm       prompt user to zoom in on a region of the plot after it is
  2268.                drawn
  2269.     OVErlay    overplot - do not erase the current plot
  2270.     MAX n      set the maximum y value in the plot
  2271.     MIN n      set the minimum y value in the plot
  2272.     COLor n    use DN value n to plot the data
  2273.  
  2274.   Example:  to compare lines 200 and 210 of the current image on the same
  2275. vertical scale, first plot line 200 (as a line) with the command
  2276.  
  2277.     PLOT LINE 200 MIN 0 MAX 255
  2278.  
  2279.    Now overlay the plot of line 210 using "+" signs and color 10 of the
  2280. current palette with the command
  2281.  
  2282.     PLOT LINE 210 OVERLAY MIN 0 MAX 255 COLOR 10 SYMBOL +
  2283.  
  2284.  
  2285.  
  2286. 4.6 OTHER UTILITY PROGRAMS
  2287.  
  2288.  
  2289.    There are several utility programs also provided on the distribution
  2290. disk.  These programs can read PDS labeled, VICAR2 labeled, or unlabeled
  2291. images.  The output images are always written with PDS ODL labels.  The
  2292. programs prompt for the necessary input values.
  2293.  
  2294.  
  2295. 4.6.1 COPIM
  2296.  
  2297.  
  2298.    COPIM is a simple image copying program.  It can copy the whole image,
  2299. for example to put PDS labels on a foreign image), or extract a window from
  2300. the image.  It can subsample the image with an integral subsampling factor.
  2301. The program prompts for the input and output file names, the window to
  2302. extract (just type return for the whole image), and the subsampling factor
  2303. (the default is 1).  If the input file is not in VICAR2 or PDS image format
  2304. the program will also prompt for the number of lines and samples, pixel
  2305. size and header size of the image.
  2306.  
  2307.    For example, to extract the first 100 lines and samples from the file
  2308. LOGO.IMG the following commands would be used:
  2309.  
  2310.    COPIM
  2311.    Input Image: LOGO.IMG
  2312.    Lines: 350 Samples: 340 Bits per pixel: 1
  2313.    Output Image: LOGOSUB.IMG
  2314.    Starting line and sample, number of lines and samples:
  2315.    1 1 100 100
  2316.    Line Subsampling factor (1): 1
  2317.    Sample Subsampling factor(1): 1
  2318.  
  2319.  
  2320. 4.6.2 CONVERT
  2321.  
  2322.  
  2323.    CONVERT is simple pixel format conversion program.  It converts an image
  2324. to an integer (16 bits), byte (8 bits), nibble (4 bits), or binary (1 bit)
  2325. image.  It can also perform a user specified scaring.  The program prompts
  2326. for the input and output file names, the output format (must be 1,4,8, or
  2327. 16 bits), and the input and output numerical ranges for scaling.  The
  2328. default scaling values are appropriate for the data types being used.
  2329.  
  2330.    For example, to convert MONTAGE.IMG to an 8-bit per pixel image and
  2331. scale the output pixels evenly between the values of 0 and 127 the
  2332. following commands would be used:
  2333.  
  2334.    CONVERT
  2335.    Input Image: MONTAGE.IMG
  2336.    Lines : 350    Samples : 640 Bits per pixel : 4
  2337.    Output Image: MONTBIG.IMG
  2338.    Output bits per pixel (1, 4, 8, 16) : 8
  2339.    Input DN range (O 15) :
  2340.    Output DN range (O 255) : 0 127
  2341.  
  2342.  
  2343.                                  Chapter 5
  2344.  
  2345.                                   CREDITS
  2346.  
  2347.    IMDISP is maintained and updated (since version 4.4) by a small group of
  2348. volunteers -- Mike Martin, Ron Baalke (JPL) and Archie Warnock (ST
  2349. Systems).  It was originally written by Mike Martin, Frank Evans and Dan
  2350. Nakamura of the Jet Propulsion Lab.  The plotting code was written by Ed
  2351. Esfandari (Interferometrics).  Paradise and Trident video drivers were
  2352. added by Gregg Gunnells of the USGS. Jerry McFaul (USGS), Ed Grayzeck (U of
  2353. MD) and Nick Beser (JHU/APL) have been valiant testers of the program
  2354. through its many iterations, and have made many suggestions for
  2355. improvements along the way.
  2356.  
  2357.    IMDISP would not have its current capabilities if it weren't for the
  2358. generous efforts of several software authors who have seen fit to donate
  2359. their work into the public domain.  Through their work, we are able to keep
  2360. IMDISP in the public domain, free to anyone who wants it.  We want to
  2361. publicly thank all of them here:
  2362.  
  2363. Gershon Elber     - GIF I/O routines (GIF_LIB.ZIP)
  2364. Michael Walraven  - High resolution timer (TIMERHI.ZIP)
  2365. Max Medley        - Mouse interface code
  2366. James Birdsall    - EMS, XMS allocation code (EMSLB215.ZIP, XMSLB121.ZIP)
  2367. Marty Del Vecchio - EMS/XMS swap routines (SWAP300.ZIP)
  2368.  
  2369.    And, of course, we would also like to thank our users, from whom we
  2370. continue to receive ideas, bug reports and fixes.  They exercise the
  2371. program in ways we never imagined.
  2372.  
  2373. GIF and 'Graphics Interchange Format' are trademarks of CompuServe,
  2374. Incorporated, an H&R Block Company.
  2375.  
  2376.                                   Appendix
  2377.  
  2378.                               COMMAND SUMMARY
  2379.  
  2380.  
  2381.    Within this command summary listing, brackets ([]) indicate optional
  2382. parameters or keywords.  Filename is the name of a file in the current
  2383. directory or a fully qualified filename which can include drive letter and
  2384. pathname.  Directory name is an MS-DOS directory path specification, a
  2385. valid directory mask a specification containing wild card characters (*, ?)
  2386. per MS-DOS rules for wildcard use in the DIRECTORY command.  The symbol "n"
  2387. is used to indicate an integer value.
  2388.  
  2389.   BATCH        [filename]
  2390.   BRIGHTEN     [n]
  2391.   BROWSE       [directory mask] [SIZe n] [SUB n] [NOLabel]  [DNLOw n]
  2392.                [DNHIgh n] [PAUse n] [ALL] [SELect] [FILe] [BUFFERS]
  2393.                [AUToset n]
  2394.   CD           [directory name] [..]
  2395.   CHDIR        [directory name] [..]
  2396.   COPY         [buffer [TO buffer]] [FILE]
  2397.   CURSOR       [DSL n] [DSS n]
  2398.   DARKEN       [n]
  2399.   DIRECTORY    [directory mask] [/w]
  2400.   DISPLAY      [SUB n] [SL n] [SS n] [NL n] [NS n] [BP n] [CENTer] [DSL n]
  2401.                [DSS n] [FLIP] [NOPrompt] [NOMemory] [AUToset] [SOUrce]
  2402.                [buffer]
  2403.   ENHANCE      [BAAlke] [CONvolution n] [EDGe n] [LOG n] [MEAn n] [MEDian]
  2404.                [POWer n] [STAir n] [SMEar] [SCReen] [UNSharp]
  2405.   ERASE        [REFRESH] [buffer]
  2406.   EXIT         [NOClear]
  2407.   FILE         [filename[.GIF]] ["CD:mm:ss:bb"] [NOMemory]
  2408.   HELP         [command name]
  2409.   HISTOGRAM    [SUB n] [SL n] [SS n] [NL n] [NS n] [BP n] [CENter]
  2410.                [VOYager] [VIKing] [buffer]
  2411.   LABEL
  2412.   LOG          [ON] [FILe filename] [CLOse] [OFF]
  2413.   MASK         [LO n [WITH n]] [HI n [WITH n]]
  2414.   MENU         [filename]
  2415.   MERGE        [buffer [scale] [WITH buffer [scale] [TO buffer]]] [FILE]
  2416.   NEG
  2417.   OVERLAY      [MAXLAT n] [MAXLON n] [MINLAT n] [MINLON n] [LEGend]
  2418.   PALETTE      [EDIT n] [PS n] [LOAd filename] [SAVe filename] [DISplay]
  2419.                [ERAse] [CYC n [FAST] [TIME n]]
  2420.   PERSPECTIVE  [SL n] [SCR]
  2421.   PLOT         [LINE n] [SYMBOL x] [COLOR n] [MAX n] [MIN n] [OVERLAY]
  2422.                [ZOOM]
  2423.   PROFILE
  2424.   QUIT         [NOClear]
  2425.   REFRESH
  2426.   SAVE         filename[.GIF] [SL n] [SS n] [NL n] [NS n] [BP n]
  2427.                [REFRESH]
  2428.   SET          [DNLO n] [DNHI n] [BROwse filename] [DIS name] [NS n]
  2429.                [PAL dir] [REFresh ON/OFF] [DELay ON/OFF] [PROmpt ON/OFF]
  2430.                [BUFFERS dir]
  2431.   SLANT        [RIGht] [LEFt]
  2432.   STRETCH      [LO n] [HI n]
  2433.   SYSTEM       [MS-DOS command]
  2434.   TEXT         [LINe n] [SAMple n] "text" or 'text' [NOPrompt]
  2435.   TYPE         filename
  2436.